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

Enhance DNS and Dialer (#341)

This commit is contained in:
Jim Han
2021-03-07 00:29:17 +08:00
committed by GitHub
parent ad1807dd99
commit db32ce6fd9
22 changed files with 682 additions and 290 deletions

View File

@ -8,7 +8,7 @@ import (
"github.com/xtls/xray-core/common/protocol"
"github.com/xtls/xray-core/common/serial"
. "github.com/xtls/xray-core/infra/conf"
"github.com/xtls/xray-core/transport"
"github.com/xtls/xray-core/transport/global"
"github.com/xtls/xray-core/transport/internet"
"github.com/xtls/xray-core/transport/internet/headers/http"
"github.com/xtls/xray-core/transport/internet/headers/noop"
@ -34,12 +34,16 @@ func TestSocketConfig(t *testing.T) {
{
Input: `{
"mark": 1,
"tcpFastOpen": true
"tcpFastOpen": true,
"domainStrategy": "UseIP",
"dialerProxy": "tag"
}`,
Parser: createParser(),
Output: &internet.SocketConfig{
Mark: 1,
Tfo: 256,
Mark: 1,
Tfo: 256,
DomainStrategy: internet.DomainStrategy_USE_IP,
DialerProxy: "tag",
},
},
})
@ -119,7 +123,7 @@ func TestTransportConfig(t *testing.T) {
}
}`,
Parser: createParser(),
Output: &transport.Config{
Output: &global.Config{
TransportSettings: []*internet.TransportConfig{
{
ProtocolName: "tcp",