mirror of
https://github.com/norouter/norouter.git
synced 2025-12-24 13:17:54 +08:00
hostaliases: xip.io -> nip.io
xip.io seems no longer available. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -22,9 +22,9 @@ See [Docker](../../examples/docker) and [Kubernetes](../../examples/kubernetes)
|
||||
By default, NoRouter creates `~/.norouter/agent/hostaliases` file like this on each hosts:
|
||||
|
||||
```
|
||||
host0 127.0.42.100.xip.io
|
||||
host1 127.0.42.101.xip.io
|
||||
host2 127.0.42.102.xip.io
|
||||
host0 127.0.42.100.nip.io
|
||||
host1 127.0.42.101.nip.io
|
||||
host2 127.0.42.102.nip.io
|
||||
```
|
||||
|
||||
The file can be used as `$HOSTALIASES` file if supported by applications.
|
||||
|
||||
@@ -31,12 +31,12 @@ import (
|
||||
type FQDNBackend = string
|
||||
|
||||
const (
|
||||
XipIO = FQDNBackend("xip.io")
|
||||
DefaultFQDNBackend = XipIO
|
||||
NipIO = FQDNBackend("nip.io")
|
||||
DefaultFQDNBackend = NipIO
|
||||
)
|
||||
|
||||
func Populate(w io.Writer, backend FQDNBackend, hostnameMap map[string]net.IP) error {
|
||||
if backend != XipIO {
|
||||
if backend != NipIO {
|
||||
return errors.Errorf("unknown backend %q", backend)
|
||||
}
|
||||
m := make(map[string]string)
|
||||
|
||||
@@ -23,15 +23,17 @@ const (
|
||||
FeatureLoopback = "loopback" // Listening on multiple loopback IPs such as 127.0.42.101, 127.0.42.102, ...
|
||||
FeatureTCP = "tcp" // TCP v4 stream
|
||||
// Features introduced in v0.4.0:
|
||||
FeatureHTTP = "http" // Listening on HTTP for proxy
|
||||
FeatureLoopbackDisable = "loopback.disable" // Disabling loopback
|
||||
FeatureSOCKS = "socks" // Listening a SOCKS proxy (SOCKS4, SOCKS4a, and SOCKS5)
|
||||
FeatureHostAliases = "hostaliases" // Creating ~/.norouter/agent/hostaliases file
|
||||
FeatureHostAliasesXipIO = "hostaliases.\"xip.io\"" // hostaliases using xip.io
|
||||
FeatureEtcHosts = "etchosts" // Writing /etc/hosts when possible
|
||||
FeatureHTTP = "http" // Listening on HTTP for proxy
|
||||
FeatureLoopbackDisable = "loopback.disable" // Disabling loopback
|
||||
FeatureSOCKS = "socks" // Listening a SOCKS proxy (SOCKS4, SOCKS4a, and SOCKS5)
|
||||
FeatureHostAliases = "hostaliases" // Creating ~/.norouter/agent/hostaliases file
|
||||
// Removed in v0.6.3: FeatureHostAliasesXipIO = "hostaliases.\"xip.io\"" // hostaliases using xip.io
|
||||
FeatureEtcHosts = "etchosts" // Writing /etc/hosts when possible
|
||||
// Features introduced in v0.5.0:
|
||||
FeatureRoutes = "routes" // Drawing packets into a specific host. Only meaningful for HTTP and SOCKS proxy modes.
|
||||
FeatureDNS = "dns" // Built-in DNS (10053/tcp)
|
||||
// Features introduced in v0.6.3:
|
||||
FeatureHostAliasesNipIO = "hostaliases.\"nip.io\"" // hostaliases using nip.io
|
||||
// Features introduced in vX.Y.Z:
|
||||
// ...
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user