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.
Network Support
Section titled “Network Support”- 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.
- Mode: Configurable via
Client Configuration (Outbound)
Section titled “Client Configuration (Outbound)”When used as an outbound, the yuubinsya block uses these fields:
Configuration Fields
Section titled “Configuration 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.
Server Configuration (Inbound)
Section titled “Server Configuration (Inbound)”yuhaiin can also operate as a Yuubinsya server.
Configuration Fields
Section titled “Configuration Fields”password(string): The password clients must provide to authenticate.udp_coalesce(bool): Enables UDP packet coalescing for incoming connections.
Listener Configuration
Section titled “Listener Configuration”A Yuubinsya server is typically used behind a tls transport layer and a tcpudp listener.
Example Configuration
Section titled “Example Configuration”Outbound Example
Section titled “Outbound Example”{ "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 } } ]}Inbound Example
Section titled “Inbound Example”{ "name": "Yuubinsya-Server", "enabled": true, "tcpudp": { "host": "0.0.0.0:443" }, "tls": { "certificates": [ { "cert": "...", "key": "..." } ] }, "yuubinsya": { "password": "server-password", "udp_coalesce": true }}Developer Details
Section titled “Developer Details”Implementation
Section titled “Implementation”Yuubinsya (meaning “Postman”) minimizes handshake overhead. The authentication is handled at the start of the stream using the provided password.
Package
Section titled “Package”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.