mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01:00 
			
		
		
		
	Merge pull request #69 from juanfont/change-default-port
Use 8080 as default port in the example config
This commit is contained in:
		
						commit
						c3aa9a5d4c
					
				| @ -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. | ||||
|  | ||||
| @ -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) | ||||
|  | ||||
| @ -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", | ||||
|  | ||||
| @ -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", | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user