syntax = "proto3";

package xray.proxy.shadowsocks_2022;

import "xcapi/xray/common/net/network.proto";
import "xcapi/xray/common/net/address.proto";

message ServerConfig {
  string method = 1;
  string key = 2;
  string email = 3;
  int32 level = 4;
  repeated xray.common.net.Network network = 5;
}

message MultiUserServerConfig {
  string method = 1;
  string key = 2;
  repeated User users = 3;
  repeated xray.common.net.Network network = 4;
}

message RelayDestination {
  string key = 1;
  xray.common.net.IPOrDomain address = 2;
  uint32 port = 3;
  string email = 4;
  int32 level = 5;
}

message RelayServerConfig {
  string method = 1;
  string key = 2;
  repeated RelayDestination destinations = 3;
  repeated xray.common.net.Network network = 4;
}

message User {
  string key = 1;
  string email = 2;
  int32 level = 3;
}

message ClientConfig {
  xray.common.net.IPOrDomain address = 1;
  uint32 port = 2;
  string method = 3;
  string key = 4;
  bool udp_over_tcp = 5;
  uint32 udp_over_tcp_version = 6;
}
