mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-02 13:56:39 +00:00
TUN inbound: Make strictRoute false by default
Like sing-box's strict_route, strictRoute is now false by default, so the Windows Filtering Platform filters are only added when it is set to true (together with autoSystemRoutingTable). With unset meaning false, strict_route becomes a plain bool field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2db099b34b
commit
eb29a4e3de
@@ -33,7 +33,7 @@ type Config struct {
|
||||
AutoOutboundsInterface string `protobuf:"bytes,7,opt,name=auto_outbounds_interface,json=autoOutboundsInterface,proto3" json:"auto_outbounds_interface,omitempty"`
|
||||
Desc string `protobuf:"bytes,8,opt,name=desc,proto3" json:"desc,omitempty"`
|
||||
AutoSystemDns bool `protobuf:"varint,9,opt,name=auto_system_dns,json=autoSystemDns,proto3" json:"auto_system_dns,omitempty"`
|
||||
StrictRoute *bool `protobuf:"varint,10,opt,name=strict_route,json=strictRoute,proto3,oneof" json:"strict_route,omitempty"`
|
||||
StrictRoute bool `protobuf:"varint,10,opt,name=strict_route,json=strictRoute,proto3" json:"strict_route,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -132,8 +132,8 @@ func (x *Config) GetAutoSystemDns() bool {
|
||||
}
|
||||
|
||||
func (x *Config) GetStrictRoute() bool {
|
||||
if x != nil && x.StrictRoute != nil {
|
||||
return *x.StrictRoute
|
||||
if x != nil {
|
||||
return x.StrictRoute
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -142,7 +142,7 @@ var File_proxy_tun_config_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_proxy_tun_config_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x16proxy/tun/config.proto\x12\x0exray.proxy.tun\"\xe3\x02\n" +
|
||||
"\x16proxy/tun/config.proto\x12\x0exray.proxy.tun\"\xcd\x02\n" +
|
||||
"\x06Config\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x10\n" +
|
||||
"\x03MTU\x18\x02 \x01(\rR\x03MTU\x12\x18\n" +
|
||||
@@ -153,10 +153,9 @@ const file_proxy_tun_config_proto_rawDesc = "" +
|
||||
"\x19auto_system_routing_table\x18\x06 \x03(\tR\x16autoSystemRoutingTable\x128\n" +
|
||||
"\x18auto_outbounds_interface\x18\a \x01(\tR\x16autoOutboundsInterface\x12\x12\n" +
|
||||
"\x04desc\x18\b \x01(\tR\x04desc\x12&\n" +
|
||||
"\x0fauto_system_dns\x18\t \x01(\bR\rautoSystemDns\x12&\n" +
|
||||
"\x0fauto_system_dns\x18\t \x01(\bR\rautoSystemDns\x12!\n" +
|
||||
"\fstrict_route\x18\n" +
|
||||
" \x01(\bH\x00R\vstrictRoute\x88\x01\x01B\x0f\n" +
|
||||
"\r_strict_routeBL\n" +
|
||||
" \x01(\bR\vstrictRouteBL\n" +
|
||||
"\x12com.xray.proxy.tunP\x01Z#github.com/xtls/xray-core/proxy/tun\xaa\x02\x0eXray.Proxy.Tunb\x06proto3"
|
||||
|
||||
var (
|
||||
@@ -188,7 +187,6 @@ func file_proxy_tun_config_proto_init() {
|
||||
if File_proxy_tun_config_proto != nil {
|
||||
return
|
||||
}
|
||||
file_proxy_tun_config_proto_msgTypes[0].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
Reference in New Issue
Block a user