diff --git a/config/admin_service_commander.go b/config/admin_service_commander.go index cdeb9d23..8cb0815a 100644 --- a/config/admin_service_commander.go +++ b/config/admin_service_commander.go @@ -96,7 +96,7 @@ func startTunnelRequest(opt ConfigOptions, installService bool) (bool, error) { Ipv6: opt.IPv6Mode == option.DomainStrategy(dns.DomainStrategyUseIPv4), ServerPort: int32(opt.InboundOptions.MixedPort), StrictRoute: opt.InboundOptions.StrictRoute, - EndpointIndependentNat: false, + EndpointIndependentNat: true, Stack: opt.InboundOptions.TUNStack, }) if err != nil { diff --git a/v2/tunnel_service.go b/v2/tunnel_service.go index e0d834bc..a190d0a2 100644 --- a/v2/tunnel_service.go +++ b/v2/tunnel_service.go @@ -11,13 +11,13 @@ import ( func (s *TunnelService) Start(ctx context.Context, in *pb.TunnelStartRequest) (*pb.TunnelResponse, error) { if in.ServerPort == 0 { - in.ServerPort = 2334 + in.ServerPort = 12334 } useFlutterBridge = false res, err := Start(&pb.StartRequest{ ConfigContent: makeTunnelConfig(in.Ipv6, in.ServerPort, in.StrictRoute, in.EndpointIndependentNat, in.Stack), EnableOldCommandServer: false, - DisableMemoryLimit: false, + DisableMemoryLimit: true, EnableRawConfig: true, }) fmt.Printf("Start Result: %+v\n", res) @@ -49,7 +49,6 @@ func makeTunnelConfig(Ipv6 bool, ServerPort int32, StrictRoute bool, EndpointInd "interface_name": "HiddifyTunnel", "inet4_address": "172.19.0.1/30", ` + ipv6 + ` - "mtu": 1492, "auto_route": true, "strict_route": ` + fmt.Sprintf("%t", StrictRoute) + `, "endpoint_independent_nat": ` + fmt.Sprintf("%t", EndpointIndependentNat) + `,