feat: TextRule line num

This commit is contained in:
Toby
2023-08-14 13:24:23 -07:00
parent cd2524c767
commit 6fa958815b
3 changed files with 17 additions and 15 deletions

View File

@@ -32,13 +32,13 @@ my_custom_outbound1(9.9.9.9,*, 8.8.8.8) # bebop
my_custom_outbound2(all)
`,
want: []TextRule{
{Outbound: "direct", Address: "1.1.1.1"},
{Outbound: "direct", Address: "8.8.8.0/24"},
{Outbound: "reject", Address: "all", ProtoPort: "udp/443"},
{Outbound: "reject", Address: "geoip:cn"},
{Outbound: "reject", Address: "*.v2ex.com"},
{Outbound: "my_custom_outbound1", Address: "9.9.9.9", ProtoPort: "*", HijackAddress: "8.8.8.8"},
{Outbound: "my_custom_outbound2", Address: "all"},
{Outbound: "direct", Address: "1.1.1.1", LineNum: 4},
{Outbound: "direct", Address: "8.8.8.0/24", LineNum: 5},
{Outbound: "reject", Address: "all", ProtoPort: "udp/443", LineNum: 6},
{Outbound: "reject", Address: "geoip:cn", LineNum: 7},
{Outbound: "reject", Address: "*.v2ex.com", LineNum: 8},
{Outbound: "my_custom_outbound1", Address: "9.9.9.9", ProtoPort: "*", HijackAddress: "8.8.8.8", LineNum: 9},
{Outbound: "my_custom_outbound2", Address: "all", LineNum: 10},
},
wantErr: false,
},