natHoleSTUNServer set default value (#3664)

This commit is contained in:
fatedier 2023-10-11 15:46:22 +08:00 committed by GitHub
parent df12cc2b9d
commit b9c24e9b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -3,3 +3,4 @@
* `transport.tls.disableCustomTLSFirstByte` doesn't have any effect.
* The Server API did not return the data correctly.
* The Dashboard is unable to display data.
* `natHoleStunServer` is missing a default value.

View File

@ -76,6 +76,7 @@ func (c *ClientCommonConfig) Complete() {
c.ServerAddr = util.EmptyOr(c.ServerAddr, "0.0.0.0")
c.ServerPort = util.EmptyOr(c.ServerPort, 7000)
c.LoginFailExit = util.EmptyOr(c.LoginFailExit, lo.ToPtr(true))
c.NatHoleSTUNServer = util.EmptyOr(c.NatHoleSTUNServer, "stun.easyvoip.com:3478")
c.Auth.Complete()
c.Log.Complete()

View File

@ -31,4 +31,5 @@ func TestClientConfigComplete(t *testing.T) {
require.Equal(true, lo.FromPtr(c.LoginFailExit))
require.Equal(true, lo.FromPtr(c.Transport.TLS.Enable))
require.Equal(true, lo.FromPtr(c.Transport.TLS.DisableCustomTLSFirstByte))
require.NotEmpty(c.NatHoleSTUNServer)
}