|
|
@@ -39,6 +39,14 @@ func TestRouterConfig(t *testing.T) {
|
|
|
},
|
|
|
{
|
|
|
"type": "field",
|
|
|
+ "domains": [
|
|
|
+ "v2fly.org",
|
|
|
+ "github.com"
|
|
|
+ ],
|
|
|
+ "outboundTag": "direct"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "field",
|
|
|
"ip": [
|
|
|
"10.0.0.0/8",
|
|
|
"::1/128"
|
|
|
@@ -88,6 +96,21 @@ func TestRouterConfig(t *testing.T) {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ Domain: []*router.Domain{
|
|
|
+ {
|
|
|
+ Type: router.Domain_Plain,
|
|
|
+ Value: "v2fly.org",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Type: router.Domain_Plain,
|
|
|
+ Value: "github.com",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ TargetTag: &router.RoutingRule_Tag{
|
|
|
+ Tag: "direct",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
Geoip: []*router.GeoIP{
|
|
|
{
|
|
|
Cidr: []*router.CIDR{
|
|
|
@@ -147,6 +170,14 @@ func TestRouterConfig(t *testing.T) {
|
|
|
},
|
|
|
{
|
|
|
"type": "field",
|
|
|
+ "domains": [
|
|
|
+ "v2fly.org",
|
|
|
+ "github.com"
|
|
|
+ ],
|
|
|
+ "outboundTag": "direct"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "field",
|
|
|
"ip": [
|
|
|
"10.0.0.0/8",
|
|
|
"::1/128"
|
|
|
@@ -176,6 +207,21 @@ func TestRouterConfig(t *testing.T) {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ Domain: []*router.Domain{
|
|
|
+ {
|
|
|
+ Type: router.Domain_Plain,
|
|
|
+ Value: "v2fly.org",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Type: router.Domain_Plain,
|
|
|
+ Value: "github.com",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ TargetTag: &router.RoutingRule_Tag{
|
|
|
+ Tag: "direct",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
Geoip: []*router.GeoIP{
|
|
|
{
|
|
|
Cidr: []*router.CIDR{
|
|
|
@@ -211,6 +257,14 @@ func TestRouterConfig(t *testing.T) {
|
|
|
},
|
|
|
{
|
|
|
"type": "field",
|
|
|
+ "domains": [
|
|
|
+ "v2fly.org",
|
|
|
+ "github.com"
|
|
|
+ ],
|
|
|
+ "outboundTag": "direct"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "field",
|
|
|
"ip": [
|
|
|
"10.0.0.0/8",
|
|
|
"::1/128"
|
|
|
@@ -239,6 +293,21 @@ func TestRouterConfig(t *testing.T) {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ Domain: []*router.Domain{
|
|
|
+ {
|
|
|
+ Type: router.Domain_Plain,
|
|
|
+ Value: "v2fly.org",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ Type: router.Domain_Plain,
|
|
|
+ Value: "github.com",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ TargetTag: &router.RoutingRule_Tag{
|
|
|
+ Tag: "direct",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
Geoip: []*router.GeoIP{
|
|
|
{
|
|
|
Cidr: []*router.CIDR{
|