修复UDP转发消失的问题(强制重写)
This commit is contained in:
@@ -344,6 +344,14 @@ cat > "$CONFIG_ROUTE_FILE" <<EOF
|
||||
{
|
||||
"protocol": "dns",
|
||||
"action": "hijack-dns"
|
||||
},
|
||||
{
|
||||
"network": [
|
||||
"udp",
|
||||
"tcp"
|
||||
],
|
||||
"action": "route",
|
||||
"outbound": "direct"
|
||||
}
|
||||
],
|
||||
"auto_detect_interface": true
|
||||
|
||||
@@ -395,6 +395,14 @@ write_default_route_config() {
|
||||
{
|
||||
"protocol": "dns",
|
||||
"action": "hijack-dns"
|
||||
},
|
||||
{
|
||||
"network": [
|
||||
"udp",
|
||||
"tcp"
|
||||
],
|
||||
"action": "route",
|
||||
"outbound": "direct"
|
||||
}
|
||||
],
|
||||
"auto_detect_interface": true
|
||||
|
||||
@@ -1215,6 +1215,9 @@ func (s *Service) setupNode() error {
|
||||
|
||||
// ── Resolve network transport settings (V2bX style) ──
|
||||
networkType := inner.Network
|
||||
if networkType == "" || networkType == "tcp" || networkType == "udp" {
|
||||
networkType = "tcp,udp"
|
||||
}
|
||||
networkSettings := inner.NetworkSettings
|
||||
if len(networkSettings) == 0 {
|
||||
networkSettings = inner.NetworkSettings_
|
||||
@@ -1230,7 +1233,7 @@ func (s *Service) setupNode() error {
|
||||
", inner_server_port=", inner.ServerPort,
|
||||
", config_port=", config.Port,
|
||||
", config_server_port=", config.ServerPort,
|
||||
", network=", networkType,
|
||||
", network=", networkType, " (forced TCP/UDP)",
|
||||
", tls=", securityType,
|
||||
", multiplex=", multiplex != nil,
|
||||
)
|
||||
@@ -1298,6 +1301,7 @@ func (s *Service) setupNode() error {
|
||||
// The panel provides it already in the correct format (base64 for 2022)
|
||||
ssOptions := &option.ShadowsocksInboundOptions{
|
||||
ListenOptions: listen,
|
||||
Network: "tcp\nudp",
|
||||
Method: method,
|
||||
Multiplex: multiplex,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user