config.proto 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. syntax = "proto3";
  2. package xray.proxy.socks;
  3. option csharp_namespace = "Xray.Proxy.Socks";
  4. option go_package = "github.com/xtls/xray-core/proxy/socks";
  5. option java_package = "com.xray.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. xray.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 xray.common.protocol.ServerEndpoint server = 1;
  39. Version version = 2;
  40. }