github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/protos/node/protocol/protocol.proto (about)

     1  syntax = "proto3";
     2  
     3  package yuhaiin.protocol;
     4  
     5  option go_package = "github.com/Asutorufa/yuhaiin/pkg/protos/node/protocol";
     6  
     7  message protocol {
     8    oneof protocol {
     9      shadowsocks shadowsocks = 1 [ json_name = "shadowsocks" ];
    10      shadowsocksr shadowsocksr = 2 [ json_name = "shadowsocksr" ];
    11      vmess vmess = 3 [ json_name = "vmess" ];
    12      websocket websocket = 4 [ json_name = "websocket" ];
    13      quic quic = 5 [ json_name = "quic" ];
    14      obfs_http obfs_http = 6 [ json_name = "obfs_http" ];
    15      trojan trojan = 7 [ json_name = "trojan" ];
    16      simple simple = 8 [ json_name = "simple" ];
    17      none none = 9 [ json_name = "none" ];
    18      socks5 socks5 = 10 [ json_name = "socks5" ];
    19      http http = 11 [ json_name = "http" ];
    20      direct direct = 12 [ json_name = "direct" ];
    21      reject reject = 13 [ json_name = "reject" ];
    22      yuubinsya yuubinsya = 14 [ json_name = "yuubinsya" ];
    23      grpc grpc = 15 [ json_name = "grpc" ];
    24      http2 http2 = 16 [ json_name = "http2" ];
    25      reality reality = 17 [ json_name = "reality" ];
    26      tls_config tls = 18 [ json_name = "tls" ];
    27      wireguard wireguard = 19 [ json_name = "wireguard" ];
    28      mux mux = 20 [ json_name = "mux" ];
    29      drop drop = 21 [ json_name = "drop" ];
    30      vless vless = 22 [ json_name = "vless" ];
    31    }
    32  }
    33  
    34  message socks5 {
    35    // eg: 127.0.0.1
    36    string hostname = 3 [ json_name = "hostname" ];
    37    string user = 1 [ json_name = "user" ];
    38    string password = 2 [ json_name = "password" ];
    39    // TODO: add override hostname options
    40  }
    41  
    42  message http {
    43    string user = 1 [ json_name = "user" ];
    44    string password = 2 [ json_name = "password" ];
    45  }
    46  
    47  message shadowsocks {
    48    string method = 1 [ json_name = "method" ];
    49    string password = 2 [ json_name = "password" ];
    50  }
    51  
    52  message shadowsocksr {
    53    string server = 1 [ json_name = "server" ];
    54    string port = 2 [ json_name = "port" ];
    55    string method = 3 [ json_name = "method" ];
    56    string password = 4 [ json_name = "password" ];
    57    string obfs = 5 [ json_name = "obfs" ];
    58    string obfsparam = 6 [ json_name = "obfsparam" ];
    59    string protocol = 7 [ json_name = "protocol" ];
    60    string protoparam = 8 [ json_name = "protoparam" ];
    61  }
    62  
    63  message http2 { int32 concurrency = 1 [ json_name = "concurrency" ]; }
    64  
    65  message vmess {
    66    // uuid
    67    string uuid = 1 [ json_name = "id" ];
    68    // alter id
    69    string alter_id = 2 [ json_name = "aid" ];
    70    string security = 3 [ json_name = "security" ];
    71  }
    72  
    73  message vless { string uuid = 1 [ json_name = "uuid" ]; }
    74  
    75  message trojan {
    76    string password = 1 [ json_name = "password" ];
    77    string peer = 2 [ json_name = "peer" ];
    78  }
    79  
    80  message yuubinsya {
    81    reserved 2;
    82    reserved "encrypted";
    83    string password = 1 [ json_name = "password" ];
    84    bool tcp_encrypt = 4 [ json_name = "tcp_encrypt" ];
    85    bool udp_encrypt = 5 [ json_name = "udp_encrypt" ];
    86    bool udp_over_stream = 3 [ json_name = "udp_over_stream" ];
    87  }
    88  
    89  message websocket {
    90    reserved 4;
    91    reserved "tls_enabled";
    92    string host = 1 [ json_name = "host" ];
    93    string path = 2 [ json_name = "path" ];
    94  }
    95  
    96  message grpc { tls_config tls = 1 [ json_name = "tls" ]; }
    97  
    98  message quic {
    99    string host = 2 [ json_name = "host" ];
   100    tls_config tls = 1 [ json_name = "tls" ];
   101  }
   102  
   103  message reality {
   104    string server_name = 1 [ json_name = "server_name" ];
   105    string public_key = 2 [ json_name = "public_key" ];
   106    string short_id = 3 [ json_name = "short_id" ];
   107    bool debug = 4 [ json_name = "debug" ];
   108  }
   109  
   110  message obfs_http {
   111    string host = 1 [ json_name = "host" ];
   112    string port = 2 [ json_name = "port" ];
   113  }
   114  
   115  message none {}
   116  
   117  message simple {
   118    reserved 4, 6, 3;
   119    reserved "tls", "timeout", "packet_conn_direct";
   120    string host = 1 [ json_name = "host" ];
   121    int32 port = 2 [ json_name = "port" ];
   122    repeated host alternate_host = 5 [ json_name = "alternate_host" ];
   123  }
   124  
   125  message tls_config {
   126    bool enable = 1 [ json_name = "enable" ];
   127    repeated string server_names = 6 [ json_name = "servernames" ];
   128    repeated bytes ca_cert = 3 [ json_name = "ca_cert" ];
   129    bool insecure_skip_verify = 4 [ json_name = "insecure_skip_verify" ];
   130    // next_protos ALPN Next Protocol
   131    // eg: h2, http/1.1
   132    repeated string next_protos = 5 [ json_name = "next_protos" ];
   133  }
   134  
   135  message direct {
   136    reserved 1;
   137    reserved "timeout";
   138  }
   139  
   140  message reject {}
   141  
   142  message drop {}
   143  
   144  message host {
   145    string host = 1 [ json_name = "host" ];
   146    int32 port = 2 [ json_name = "port" ];
   147  }
   148  
   149  message wireguard_peer_config {
   150    string public_key = 1;
   151    string pre_shared_key = 2;
   152    string endpoint = 3;
   153    int32 keep_alive = 4;
   154    repeated string allowed_ips = 5;
   155  }
   156  
   157  message wireguard {
   158    string secret_key = 1;
   159    repeated string endpoint = 2;
   160    repeated wireguard_peer_config peers = 3;
   161    int32 mtu = 4;
   162    bytes reserved = 6;
   163    int32 idle_timeout = 7;
   164  }
   165  
   166  message mux { int32 concurrency = 1 [ json_name = "concurrency" ]; }