frpc: support 'includes' in common section to include proxy configs in other files(#2421)

This commit is contained in:
fatedier
2021-06-02 00:39:05 +08:00
committed by GitHub
parent 9ae322cccf
commit c32a2ed140
4 changed files with 116 additions and 54 deletions

View File

@@ -290,12 +290,13 @@ func Test_LoadClientCommonConf(t *testing.T) {
"var1": "123",
"var2": "234",
},
UDPPacketSize: 1509,
UDPPacketSize: 1509,
IncludeConfigFiles: []string{},
}
common, err := UnmarshalClientConfFromIni(testClientBytesWithFull)
assert.NoError(err)
assert.Equal(expected, common)
assert.EqualValues(expected, common)
}
func Test_LoadClientBasicConf(t *testing.T) {
@@ -641,5 +642,4 @@ func Test_LoadClientBasicConf(t *testing.T) {
assert.NoError(err)
assert.Equal(proxyExpected, proxyActual)
assert.Equal(visitorExpected, visitorActual)
}