mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
natHoleSTUNServer set default value (#3664)
This commit is contained in:
parent
df12cc2b9d
commit
b9c24e9b69
@ -3,3 +3,4 @@
|
|||||||
* `transport.tls.disableCustomTLSFirstByte` doesn't have any effect.
|
* `transport.tls.disableCustomTLSFirstByte` doesn't have any effect.
|
||||||
* The Server API did not return the data correctly.
|
* The Server API did not return the data correctly.
|
||||||
* The Dashboard is unable to display data.
|
* The Dashboard is unable to display data.
|
||||||
|
* `natHoleStunServer` is missing a default value.
|
||||||
|
@ -76,6 +76,7 @@ func (c *ClientCommonConfig) Complete() {
|
|||||||
c.ServerAddr = util.EmptyOr(c.ServerAddr, "0.0.0.0")
|
c.ServerAddr = util.EmptyOr(c.ServerAddr, "0.0.0.0")
|
||||||
c.ServerPort = util.EmptyOr(c.ServerPort, 7000)
|
c.ServerPort = util.EmptyOr(c.ServerPort, 7000)
|
||||||
c.LoginFailExit = util.EmptyOr(c.LoginFailExit, lo.ToPtr(true))
|
c.LoginFailExit = util.EmptyOr(c.LoginFailExit, lo.ToPtr(true))
|
||||||
|
c.NatHoleSTUNServer = util.EmptyOr(c.NatHoleSTUNServer, "stun.easyvoip.com:3478")
|
||||||
|
|
||||||
c.Auth.Complete()
|
c.Auth.Complete()
|
||||||
c.Log.Complete()
|
c.Log.Complete()
|
||||||
|
@ -31,4 +31,5 @@ func TestClientConfigComplete(t *testing.T) {
|
|||||||
require.Equal(true, lo.FromPtr(c.LoginFailExit))
|
require.Equal(true, lo.FromPtr(c.LoginFailExit))
|
||||||
require.Equal(true, lo.FromPtr(c.Transport.TLS.Enable))
|
require.Equal(true, lo.FromPtr(c.Transport.TLS.Enable))
|
||||||
require.Equal(true, lo.FromPtr(c.Transport.TLS.DisableCustomTLSFirstByte))
|
require.Equal(true, lo.FromPtr(c.Transport.TLS.DisableCustomTLSFirstByte))
|
||||||
|
require.NotEmpty(c.NatHoleSTUNServer)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user