netchx/netch · error · MessageException

transfer protocol "{server.TransferProtocol}" not implemente

Error message

transfer protocol "{server.TransferProtocol}" not implemented yet

What it means

The StreamSettings builder switches on server.TransferProtocol and explicitly handles tcp, ws, kcp, h2, quic, grpc. The default arm throws for any other value, signalling a transport Netch does not (yet) generate V2Ray config for. Unlike error [22] (about the tcp header/FakeType), this fires on the top-level transport field itself. The combo box in the editor normally restricts choices to VMessGlobal.TransferProtocols, but imported/serialized configs bypass that constraint.

Source

Thrown at Netch/Servers/V2ray/V2rayConfigUtils.cs:415

                    key = server.QUICSecret,
                    header = new
                    {
                        type = server.FakeType
                    }
                };

                break;
            case "grpc":

                streamSettings.grpcSettings = new GrpcSettings
                {
                    serviceName = server.Path,
                    multiMode = server.FakeType == "multi"
                };

                break;
            default:
                throw new MessageException($"transfer protocol \"{server.TransferProtocol}\" not implemented yet");
        }

        if (Global.Settings.V2RayConfig.TCPFastOpen)
        {
            streamSettings.sockopt = new Sockopt
            {
                tcpFastOpen = true
            };
        }

        return streamSettings;
    }

    public static string getUUID(string uuid)
    {
        if (uuid.Length == 36 || uuid.Length == 32)
        {
            return uuid;

View on GitHub (pinned to 9d99eb1c5a)

Solutions

  1. Set TransferProtocol to one of: tcp, ws, kcp, h2, quic, grpc.
  2. Update Netch to a build that implements the protocol.
  3. Re-import the server from a correct vmess:// link.
  4. Edit the server and pick a supported transport from the drop-down.

Example fix

// before
default:
    throw new MessageException($"transfer protocol \"{server.TransferProtocol}\" not implemented yet");
// after - fall back to tcp and warn instead of throwing
Log.Warning("Unsupported transfer protocol {Protocol}, falling back to tcp", server.TransferProtocol);
server.TransferProtocol = "tcp";
goto case "tcp";
Defensive patterns

Strategy: validation

Validate before calling

static readonly HashSet<string> SupportedTransports = new() { "tcp", "ws", "kcp", "h2", "quic", "grpc" };
if (!SupportedTransports.Contains(server.TransferProtocol))
    throw new MessageException($"Unsupported transport '{server.TransferProtocol}'");

Type guard

static readonly string[] Supported = { "tcp", "ws", "kcp", "h2", "quic", "grpc" };
bool IsSupportedTransport(string t) => Array.IndexOf(Supported, t) >= 0;

Try / catch

try { return BuildStreamSettings(server); }
catch (MessageException ex) when (ex.Message.Contains("not implemented yet"))
{
    Log.Error("Server {Remark} uses unsupported transport {T}", server.Remark, server.TransferProtocol);
    throw;
}

Prevention

When it happens

Trigger: server.TransferProtocol set to a string outside {tcp, ws, kcp, h2, quic, grpc}: a typo, a value from a newer V2Ray spec, a protocol dropped in this build, or a hand-edited settings.json.

Common situations: Loading an old settings.json naming a transport removed in this build; a future protocol not yet wired up; manual JSON edit introducing an invalid value; a share link using an exotic transport.

Related errors


AI-assisted analysis of netchx/netch@9d99eb1c5a (2026-08-13). Data as JSON: /api/errors/46bb174fdd58b2c9. Report an issue: GitHub.