Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
fix: Listen on all interfaces by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Mar 19, 2020
1 parent ceb07a0 commit 64f23d3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Usage:
Flags:
-h, --help help for supernoded
-f, --supernoded.configFile string Configuration file to use.
-l, --supernoded.listenHostPort string TCP listen host:port. (default "localhost:1050")
-l, --supernoded.listenHostPort string TCP listen host:port. (default ":1050")
```

#### `edged`
Expand All @@ -84,7 +84,7 @@ Usage:

Flags:
-f, --edged.configFile string Configuration file to use.
-l, --edged.listenHostPort string TCP listen host:port. (default "localhost:1060")
-l, --edged.listenHostPort string TCP listen host:port. (default ":1060")
-h, --help help for edged
```

Expand Down
6 changes: 3 additions & 3 deletions cmd/constants.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

const (
SupernodeHostPortDefault = "localhost:1234" // SupernodeHostPortDefault is the default supernode Host:port that edges started in `edged` should connect to.
EdgedServerHostPortDefault = "localhost:1060" // EdgedServerHostPortDefault is the default Host:port of `edged`.
SupernodeServerHostPortDefault = "localhost:1050" // SupernodeServerHostPortDefault is the default Host:port of `supernoded`.
SupernodeHostPortDefault = ":1234" // SupernodeHostPortDefault is the default supernode Host:port that edges started in `edged` should connect to.
EdgedServerHostPortDefault = ":1060" // EdgedServerHostPortDefault is the default Host:port of `edged`.
SupernodeServerHostPortDefault = ":1050" // SupernodeServerHostPortDefault is the default Host:port of `supernoded`.
HostPortDocs = "Host:port of the server to use." // HostPortDocs is the documentation for the host:port flag.
ConfigurationFileDocs = "Configuration file to use." // ConfigurationFileDocs is the documentation for the configuration file flag.)
)
Expand Down
2 changes: 1 addition & 1 deletion examples/edge-dhcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edge:
managementPort: 5645
registerInterval: 1
registerTTL: 1
supernodeHostPort: localhost:1234
supernodeHostPort: :1234
typeOfService: 16
encryptionMethod: 2
deviceName: edge1
Expand Down
2 changes: 1 addition & 1 deletion examples/edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edge:
managementPort: 5644
registerInterval: 1
registerTTL: 1
supernodeHostPort: localhost:1234
supernodeHostPort: :1234
typeOfService: 16
encryptionMethod: 2
deviceName: edge0
Expand Down
2 changes: 1 addition & 1 deletion examples/edged.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
edged:
listenHostPort: localhost:1060
listenHostPort: :1060
2 changes: 1 addition & 1 deletion examples/supernoded.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
supernoded:
listenHostPort: localhost:1050
listenHostPort: :1050
2 changes: 1 addition & 1 deletion pkg/workers/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Edge struct {
ManagementPort int // UDP management port. `5644` is the n2n default.
RegisterInterval int // Interval in seconds for both UDP NAT hole punching and registration of the edge on the supernode. `1` is the n2n default.
RegisterTTL int // Interval in seconds for UDP NAT hole punching through the supernode. `1` is the n2n default.
SupernodeHostPort string // Host:port of the supernode to connect to, i.e. `"localhost:1234"`.
SupernodeHostPort string // Host:port of the supernode to connect to, i.e. `":1234"`.
TypeOfService int // Type of service to use. `16` is the n2n default.
EncryptionMethod int // Method of encryption to use. `1` is no encryption, `2` is Twofish encryption, `3` is AES-CBC encryption. Twofish encryption is the n2n default, but only due to legacy compatibility reasons; AES-CBC is up to ten times faster.
DeviceName string // Name of the TUN/TAP device to create, i.e. `"edge0"`.
Expand Down

0 comments on commit 64f23d3

Please sign in to comment.