0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 11:29:36 +03:00

Enhance TCP Fast Open (#310)

This commit is contained in:
risetechlab
2021-03-06 22:45:12 +08:00
committed by GitHub
parent e1a5392beb
commit ad1807dd99
9 changed files with 147 additions and 198 deletions

View File

@ -39,7 +39,31 @@ func TestSocketConfig(t *testing.T) {
Parser: createParser(),
Output: &internet.SocketConfig{
Mark: 1,
Tfo: internet.SocketConfig_Enable,
Tfo: 256,
},
},
})
runMultiTestCase(t, []TestCase{
{
Input: `{
"tcpFastOpen": false
}`,
Parser: createParser(),
Output: &internet.SocketConfig{
Mark: 0,
Tfo: 0,
},
},
})
runMultiTestCase(t, []TestCase{
{
Input: `{
"tcpFastOpen": 65535
}`,
Parser: createParser(),
Output: &internet.SocketConfig{
Mark: 0,
Tfo: 65535,
},
},
})