diff --git a/internal/xrpc/services/handler/inbound.go b/internal/xrpc/services/handler/inbound.go index 4bcfe66..f8fc4c9 100644 --- a/internal/xrpc/services/handler/inbound.go +++ b/internal/xrpc/services/handler/inbound.go @@ -19,7 +19,6 @@ import ( vlessin "github.com/xtls/xray-core/proxy/vless/inbound" "github.com/xtls/xray-core/proxy/vmess" vmessin "github.com/xtls/xray-core/proxy/vmess/inbound" - "github.com/xtls/xray-core/proxy/wireguard" ) // AddVMessInbound demonstrates HandlerServiceClient.AddInbound for VMess inbound. @@ -247,28 +246,3 @@ func AddLoopbackInbound(ctx context.Context, client command.HandlerServiceClient return err } -// AddWireGuardInbound sets up a WireGuard entry point with a single peer. -func AddWireGuardInbound(ctx context.Context, client command.HandlerServiceClient, tag string, port uint32) error { - cfg := &wireguard.DeviceConfig{ - SecretKey: "yAnExampleSecretKeyBase64==", - Endpoint: []string{":51820"}, - Mtu: 1420, - NumWorkers: 2, - DomainStrategy: wireguard.DeviceConfig_FORCE_IP46, - Peers: []*wireguard.PeerConfig{ - { - PublicKey: "peerPublicKeyBase64==", - Endpoint: "203.0.113.1:51820", - KeepAlive: 25, - AllowedIps: []string{"0.0.0.0/0", "::/0"}, - }, - }, - } - inbound := inboundConfig( - tag, - receiverSettings(port, false), - serial.ToTypedMessage(cfg), - ) - _, err := client.AddInbound(ctx, &command.AddInboundRequest{Inbound: inbound}) - return err -} diff --git a/internal/xrpc/services/handler/outbound.go b/internal/xrpc/services/handler/outbound.go index 47f62ac..d828f15 100644 --- a/internal/xrpc/services/handler/outbound.go +++ b/internal/xrpc/services/handler/outbound.go @@ -19,7 +19,6 @@ import ( vlessout "github.com/xtls/xray-core/proxy/vless/outbound" "github.com/xtls/xray-core/proxy/vmess" vmessout "github.com/xtls/xray-core/proxy/vmess/outbound" - "github.com/xtls/xray-core/proxy/wireguard" "github.com/xtls/xray-core/transport/internet" ) @@ -197,25 +196,3 @@ func AddVMessOutbound(ctx context.Context, client command.HandlerServiceClient, return err } -func AddWireGuardOutbound(ctx context.Context, client command.HandlerServiceClient, tag string) error { - cfg := outboundConfig( - tag, - senderSettings(), - serial.ToTypedMessage(&wireguard.DeviceConfig{ - SecretKey: "clientSecretKeyBase64==", - Endpoint: []string{"198.51.100.2:51820"}, - IsClient: true, - Mtu: 1420, - DomainStrategy: wireguard.DeviceConfig_FORCE_IP4, - Peers: []*wireguard.PeerConfig{ - { - PublicKey: "serverPublicKeyBase64==", - AllowedIps: []string{"0.0.0.0/0"}, - KeepAlive: 30, - }, - }, - }), - ) - _, err := client.AddOutbound(ctx, &command.AddOutboundRequest{Outbound: cfg}) - return err -}