config.proto 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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/v4/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/protocol/server_spec.proto";
  9. // Account represents a Socks account.
  10. message Account {
  11. string username = 1;
  12. string password = 2;
  13. }
  14. // AuthType is the authentication type of Socks proxy.
  15. enum AuthType {
  16. // NO_AUTH is for anounymous authentication.
  17. NO_AUTH = 0;
  18. // PASSWORD is for username/password authentication.
  19. PASSWORD = 1;
  20. }
  21. enum Version {
  22. SOCKS5 = 0;
  23. SOCKS4 = 1;
  24. SOCKS4A = 2;
  25. }
  26. // ServerConfig is the protobuf config for Socks server.
  27. message ServerConfig {
  28. AuthType auth_type = 1;
  29. map<string, string> accounts = 2;
  30. v2ray.core.common.net.IPOrDomain address = 3;
  31. bool udp_enabled = 4;
  32. uint32 timeout = 5 [deprecated = true];
  33. uint32 user_level = 6;
  34. }
  35. // ClientConfig is the protobuf config for Socks client.
  36. message ClientConfig {
  37. // Sever is a list of Socks server addresses.
  38. repeated v2ray.core.common.protocol.ServerEndpoint server = 1;
  39. Version version = 2;
  40. }