config.proto 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. syntax = "proto3";
  2. package v2ray.core.proxy.socks;
  3. option csharp_namespace = "V2Ray.Core.Proxy.Socks";
  4. option go_package = "github.com/v2fly/v2ray-core/v5/proxy/socks";
  5. option java_package = "com.v2ray.core.proxy.socks";
  6. option java_multiple_files = true;
  7. import "common/net/address.proto";
  8. import "common/net/packetaddr/config.proto";
  9. import "common/protocol/server_spec.proto";
  10. // Account represents a Socks account.
  11. message Account {
  12. string username = 1;
  13. string password = 2;
  14. }
  15. // AuthType is the authentication type of Socks proxy.
  16. enum AuthType {
  17. // NO_AUTH is for anonymous authentication.
  18. NO_AUTH = 0;
  19. // PASSWORD is for username/password authentication.
  20. PASSWORD = 1;
  21. }
  22. enum Version {
  23. SOCKS5 = 0;
  24. SOCKS4 = 1;
  25. SOCKS4A = 2;
  26. }
  27. // ServerConfig is the protobuf config for Socks server.
  28. message ServerConfig {
  29. AuthType auth_type = 1;
  30. map<string, string> accounts = 2;
  31. v2ray.core.common.net.IPOrDomain address = 3;
  32. bool udp_enabled = 4;
  33. uint32 timeout = 5 [deprecated = true];
  34. uint32 user_level = 6;
  35. v2ray.core.net.packetaddr.PacketAddrType packet_encoding = 7;
  36. }
  37. // ClientConfig is the protobuf config for Socks client.
  38. message ClientConfig {
  39. // Sever is a list of Socks server addresses.
  40. repeated v2ray.core.common.protocol.ServerEndpoint server = 1;
  41. Version version = 2;
  42. }