Use 8080 as default port, like in the Kubernetes yamls

This commit is contained in:
Juan Font Alonso 2021-07-30 17:07:19 +02:00
parent 91bfb481c1
commit 4fb55e1684
4 changed files with 11 additions and 11 deletions

View File

@ -111,8 +111,8 @@ Please bear in mind that all the commands from headscale support adding `-o json
Headscale's configuration file is named `config.json` or `config.yaml`. Headscale will look for it in `/etc/headscale`, `~/.headscale` and finally the directory from where the Headscale binary is executed. Headscale's configuration file is named `config.json` or `config.yaml`. Headscale will look for it in `/etc/headscale`, `~/.headscale` and finally the directory from where the Headscale binary is executed.
``` ```
"server_url": "http://192.168.1.12:8000", "server_url": "http://192.168.1.12:8080",
"listen_addr": "0.0.0.0:8000", "listen_addr": "0.0.0.0:8080",
``` ```
`server_url` is the external URL via which Headscale is reachable. `listen_addr` is the IP address and port the Headscale program should listen on. `server_url` is the external URL via which Headscale is reachable. `listen_addr` is the IP address and port the Headscale program should listen on.

View File

@ -51,8 +51,8 @@ func (*Suite) TestPostgresConfigLoading(c *check.C) {
c.Assert(err, check.IsNil) c.Assert(err, check.IsNil)
// Test that config file was interpreted correctly // Test that config file was interpreted correctly
c.Assert(viper.GetString("server_url"), check.Equals, "http://127.0.0.1:8000") c.Assert(viper.GetString("server_url"), check.Equals, "http://127.0.0.1:8080")
c.Assert(viper.GetString("listen_addr"), check.Equals, "0.0.0.0:8000") c.Assert(viper.GetString("listen_addr"), check.Equals, "0.0.0.0:8080")
c.Assert(viper.GetString("derp_map_path"), check.Equals, "derp.yaml") c.Assert(viper.GetString("derp_map_path"), check.Equals, "derp.yaml")
c.Assert(viper.GetString("db_type"), check.Equals, "postgres") c.Assert(viper.GetString("db_type"), check.Equals, "postgres")
c.Assert(viper.GetString("db_port"), check.Equals, "5432") c.Assert(viper.GetString("db_port"), check.Equals, "5432")
@ -84,8 +84,8 @@ func (*Suite) TestSqliteConfigLoading(c *check.C) {
c.Assert(err, check.IsNil) c.Assert(err, check.IsNil)
// Test that config file was interpreted correctly // Test that config file was interpreted correctly
c.Assert(viper.GetString("server_url"), check.Equals, "http://127.0.0.1:8000") c.Assert(viper.GetString("server_url"), check.Equals, "http://127.0.0.1:8080")
c.Assert(viper.GetString("listen_addr"), check.Equals, "0.0.0.0:8000") c.Assert(viper.GetString("listen_addr"), check.Equals, "0.0.0.0:8080")
c.Assert(viper.GetString("derp_map_path"), check.Equals, "derp.yaml") c.Assert(viper.GetString("derp_map_path"), check.Equals, "derp.yaml")
c.Assert(viper.GetString("db_type"), check.Equals, "sqlite3") c.Assert(viper.GetString("db_type"), check.Equals, "sqlite3")
c.Assert(viper.GetString("db_path"), check.Equals, "db.sqlite") c.Assert(viper.GetString("db_path"), check.Equals, "db.sqlite")
@ -125,7 +125,7 @@ func (*Suite) TestTLSConfigValidation(c *check.C) {
fmt.Println(tmp) fmt.Println(tmp)
// Check configuration validation errors (2) // Check configuration validation errors (2)
configYaml = []byte("---\nserver_url: \"http://127.0.0.1:8000\"\ntls_letsencrypt_hostname: \"example.com\"\ntls_letsencrypt_challenge_type: \"TLS-ALPN-01\"") configYaml = []byte("---\nserver_url: \"http://127.0.0.1:8080\"\ntls_letsencrypt_hostname: \"example.com\"\ntls_letsencrypt_challenge_type: \"TLS-ALPN-01\"")
writeConfig(c, tmpDir, configYaml) writeConfig(c, tmpDir, configYaml)
err = cli.LoadConfig(tmpDir) err = cli.LoadConfig(tmpDir)
c.Assert(err, check.IsNil) c.Assert(err, check.IsNil)

View File

@ -1,6 +1,6 @@
{ {
"server_url": "http://127.0.0.1:8000", "server_url": "http://127.0.0.1:8080",
"listen_addr": "0.0.0.0:8000", "listen_addr": "0.0.0.0:8080",
"private_key_path": "private.key", "private_key_path": "private.key",
"derp_map_path": "derp.yaml", "derp_map_path": "derp.yaml",
"ephemeral_node_inactivity_timeout": "30m", "ephemeral_node_inactivity_timeout": "30m",

View File

@ -1,6 +1,6 @@
{ {
"server_url": "http://127.0.0.1:8000", "server_url": "http://127.0.0.1:8080",
"listen_addr": "0.0.0.0:8000", "listen_addr": "0.0.0.0:8080",
"private_key_path": "private.key", "private_key_path": "private.key",
"derp_map_path": "derp.yaml", "derp_map_path": "derp.yaml",
"ephemeral_node_inactivity_timeout": "30m", "ephemeral_node_inactivity_timeout": "30m",