Skip to content

Commit

Permalink
update proto def
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Apr 2, 2017
1 parent 9d6513d commit 2111c7e
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 120 deletions.
178 changes: 75 additions & 103 deletions app/proxyman/config.pb.go

Large diffs are not rendered by default.

13 changes: 4 additions & 9 deletions app/proxyman/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ option go_package = "proxyman";
option java_package = "com.v2ray.core.app.proxyman";
option java_multiple_files = true;

message InboundConfig {
}

import "v2ray.com/core/common/serial/typed_message.proto";
import "v2ray.com/core/common/net/address.proto";
import "v2ray.com/core/common/net/destination.proto";
import "v2ray.com/core/common/net/port.proto";
import "v2ray.com/core/transport/internet/config.proto";

message InboundConfig {
}

message AllocationStrategy {
enum Type {
// Always allocate all connection handlers.
Expand Down Expand Up @@ -60,7 +60,6 @@ message InboundHandlerConfig {
string tag = 1;
v2ray.core.common.serial.TypedMessage receiver_settings = 2;
v2ray.core.common.serial.TypedMessage proxy_settings = 3;
DispatchConfig dispatch_settings = 4;
}

message OutboundConfig {
Expand All @@ -72,6 +71,7 @@ message SenderConfig {
v2ray.core.common.net.IPOrDomain via = 1;
v2ray.core.transport.internet.StreamConfig stream_settings = 2;
v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
MultiplexingConfig multiplex_settings = 4;
}

message OutboundHandlerConfig {
Expand All @@ -80,17 +80,12 @@ message OutboundHandlerConfig {
v2ray.core.common.serial.TypedMessage proxy_settings = 3;
int64 expire = 4;
string comment = 5;
DispatchConfig dispatch_settings = 6;
}

message MultiplexingConfig {
bool enabled = 1;
}

message DispatchConfig {
MultiplexingConfig mux_settings = 1;
}

message SessionFrame {
uint32 id = 1;

Expand Down
1 change: 1 addition & 0 deletions common/net/address.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// Address of a network host. It may be either an IP address or a domain address.
type IPOrDomain struct {
// Types that are valid to be assigned to Address:
// *IPOrDomain_Ip
Expand Down
1 change: 1 addition & 0 deletions common/net/destination.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// Endpoint of a network connection.
type Endpoint struct {
Network Network `protobuf:"varint,1,opt,name=network,enum=v2ray.core.common.net.Network" json:"network,omitempty"`
Address *IPOrDomain `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
Expand Down
9 changes: 4 additions & 5 deletions common/net/network.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ type Network int32

const (
Network_Unknown Network = 0
// Native TCP provided by system.
Network_RawTCP Network = 1
// V2Ray specific TCP.
Network_TCP Network = 2
Network_UDP Network = 3
Network_RawTCP Network = 1
Network_TCP Network = 2
Network_UDP Network = 3
)

var Network_name = map[int32]string{
Expand All @@ -38,6 +36,7 @@ func (x Network) String() string {
}
func (Network) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }

// NetworkList is a list of Networks.
type NetworkList struct {
Network []Network `protobuf:"varint,1,rep,packed,name=network,enum=v2ray.core.common.net.Network" json:"network,omitempty"`
}
Expand Down
4 changes: 3 additions & 1 deletion common/net/port.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ var _ = math.Inf

// PortRange represents a range of ports.
type PortRange struct {
// The port that this range starts from.
From uint32 `protobuf:"varint,1,opt,name=From" json:"From,omitempty"`
To uint32 `protobuf:"varint,2,opt,name=To" json:"To,omitempty"`
// The port that this range ends with (inclusive).
To uint32 `protobuf:"varint,2,opt,name=To" json:"To,omitempty"`
}

func (m *PortRange) Reset() { *m = PortRange{} }
Expand Down
1 change: 1 addition & 0 deletions common/protocol/user.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// User is a generic user for all procotols.
type User struct {
Level uint32 `protobuf:"varint,1,opt,name=level" json:"level,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"`
Expand Down
6 changes: 4 additions & 2 deletions config.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ func (x ConfigFormat) String() string {
}
func (ConfigFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

// Master config of V2Ray. V2Ray Core takes this config as input and functions accordingly.
type Config struct {
// Inbound handler configurations. Must have at least one item.
Inbound []*v2ray_core_app_proxyman.InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound" json:"inbound,omitempty"`
// Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
Outbound []*v2ray_core_app_proxyman.OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound" json:"outbound,omitempty"`
// App configuration. Must be one in the app directory.
App []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,4,rep,name=app" json:"app,omitempty"`
Transport *v2ray_core_transport.Config `protobuf:"bytes,5,opt,name=transport" json:"transport,omitempty"`
App []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,4,rep,name=app" json:"app,omitempty"`
// Transport settings.
Transport *v2ray_core_transport.Config `protobuf:"bytes,5,opt,name=transport" json:"transport,omitempty"`
}

func (m *Config) Reset() { *m = Config{} }
Expand Down

0 comments on commit 2111c7e

Please sign in to comment.