-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support dest override in dns outbound
- Loading branch information
1 parent
6c31049
commit 114ec4c
Showing
7 changed files
with
191 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package conf_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"v2ray.com/core/common/net" | ||
. "v2ray.com/core/infra/conf" | ||
"v2ray.com/core/proxy/dns" | ||
) | ||
|
||
func TestDnsProxyConfig(t *testing.T) { | ||
creator := func() Buildable { | ||
return new(DnsOutboundConfig) | ||
} | ||
|
||
runMultiTestCase(t, []TestCase{ | ||
{ | ||
Input: `{ | ||
"address": "8.8.8.8", | ||
"port": 53, | ||
"network": "tcp" | ||
}`, | ||
Parser: loadJSON(creator), | ||
Output: &dns.Config{ | ||
Server: &net.Endpoint{ | ||
Network: net.Network_TCP, | ||
Address: net.NewIPOrDomain(net.IPAddress([]byte{8, 8, 8, 8})), | ||
Port: 53, | ||
}, | ||
}, | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters