From 4fb55e1684b7fb02905caa01159cc164f2d81233 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Fri, 30 Jul 2021 17:07:19 +0200 Subject: [PATCH] Use 8080 as default port, like in the Kubernetes yamls --- README.md | 4 ++-- cmd/headscale/headscale_test.go | 10 +++++----- config.json.postgres.example | 4 ++-- config.json.sqlite.example | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9553895960..5f90c8319a 100644 --- a/README.md +++ b/README.md @@ -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. ``` - "server_url": "http://192.168.1.12:8000", - "listen_addr": "0.0.0.0:8000", + "server_url": "http://192.168.1.12:8080", + "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. diff --git a/cmd/headscale/headscale_test.go b/cmd/headscale/headscale_test.go index 7631f76c45..8fcf8a54cf 100644 --- a/cmd/headscale/headscale_test.go +++ b/cmd/headscale/headscale_test.go @@ -51,8 +51,8 @@ func (*Suite) TestPostgresConfigLoading(c *check.C) { c.Assert(err, check.IsNil) // 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("listen_addr"), check.Equals, "0.0.0.0: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:8080") 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_port"), check.Equals, "5432") @@ -84,8 +84,8 @@ func (*Suite) TestSqliteConfigLoading(c *check.C) { c.Assert(err, check.IsNil) // 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("listen_addr"), check.Equals, "0.0.0.0: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:8080") 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_path"), check.Equals, "db.sqlite") @@ -125,7 +125,7 @@ func (*Suite) TestTLSConfigValidation(c *check.C) { fmt.Println(tmp) // 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) err = cli.LoadConfig(tmpDir) c.Assert(err, check.IsNil) diff --git a/config.json.postgres.example b/config.json.postgres.example index 22c9eac796..fe772d7340 100644 --- a/config.json.postgres.example +++ b/config.json.postgres.example @@ -1,6 +1,6 @@ { - "server_url": "http://127.0.0.1:8000", - "listen_addr": "0.0.0.0:8000", + "server_url": "http://127.0.0.1:8080", + "listen_addr": "0.0.0.0:8080", "private_key_path": "private.key", "derp_map_path": "derp.yaml", "ephemeral_node_inactivity_timeout": "30m", diff --git a/config.json.sqlite.example b/config.json.sqlite.example index 8010088a9e..e965059a6d 100644 --- a/config.json.sqlite.example +++ b/config.json.sqlite.example @@ -1,6 +1,6 @@ { - "server_url": "http://127.0.0.1:8000", - "listen_addr": "0.0.0.0:8000", + "server_url": "http://127.0.0.1:8080", + "listen_addr": "0.0.0.0:8080", "private_key_path": "private.key", "derp_map_path": "derp.yaml", "ephemeral_node_inactivity_timeout": "30m",