Skip to content

Yuubinsya

[!NOTE] This document is partially generated by AI.

Yuubinsya is a custom, high-performance proxy protocol developed specifically for yuhaiin. It is designed to be simple, efficient, and easily extensible. it is supported as both an outbound and an inbound protocol.

  • TCP: Supported natively.
  • UDP: Supported.
    • Mode: Configurable via udp_over_stream.
    • UDP over Stream: If enabled, UDP packets are encapsulated within a TCP stream. Supports Full-Cone NAT.
    • Native UDP: If disabled, UDP packets are sent as raw packets over the network. Supports Full-Cone NAT.

When used as an outbound, the yuubinsya block uses these fields:

  • password (string): The authentication password used to secure the connection.
  • udp_over_stream (bool): If enabled, UDP traffic will be tunneled over the established TCP or TLS stream. This is useful for improving UDP connectivity in restricted networks.
  • udp_coalesce (bool): Enables UDP packet coalescing to optimize transmission by grouping multiple small packets.

yuhaiin can also operate as a Yuubinsya server.

  • password (string): The password clients must provide to authenticate.
  • udp_coalesce (bool): Enables UDP packet coalescing for incoming connections.

A Yuubinsya server is typically used behind a tls transport layer and a tcpudp listener.

{
"name": "Yuubinsya-Out",
"protocols": [
{ "simple": { "host": "server.example.com", "port": 443 } },
{ "tls": { "enable": true, "servernames": ["server.example.com"] } },
{ "yuubinsya": { "password": "mypassword", "udp_over_stream": true } }
]
}
{
"name": "Yuubinsya-Server",
"enabled": true,
"tcpudp": { "host": "0.0.0.0:443" },
"tls": {
"certificates": [ { "cert": "...", "key": "..." } ]
},
"yuubinsya": { "password": "server-password", "udp_coalesce": true }
}

Yuubinsya (meaning “Postman”) minimizes handshake overhead. The authentication is handled at the start of the stream using the provided password.

Located in pkg/net/proxy/yuubinsya. It provides a dedicated netapi.Proxy implementation that handles the protocol-specific framing for both TCP and UDP data.