mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-30 23:37:44 +00:00
protobuf for stream settings
This commit is contained in:
59 files changed
+1243
-323
No files matched your search
@@ -13,7 +13,7 @@ import (
|
||||
type InboundConnectionConfig struct {
|
||||
Port v2net.Port
|
||||
ListenOn v2net.Address
|
||||
StreamSettings *internet.StreamSettings
|
||||
StreamSettings *internet.StreamConfig
|
||||
Protocol string
|
||||
Settings []byte
|
||||
AllowPassiveConnection bool
|
||||
@@ -22,7 +22,7 @@ type InboundConnectionConfig struct {
|
||||
type OutboundConnectionConfig struct {
|
||||
Protocol string
|
||||
SendThrough v2net.Address
|
||||
StreamSettings *internet.StreamSettings
|
||||
StreamSettings *internet.StreamConfig
|
||||
Settings []byte
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ type InboundDetourConfig struct {
|
||||
ListenOn v2net.Address
|
||||
Tag string
|
||||
Allocation *InboundDetourAllocationConfig
|
||||
StreamSettings *internet.StreamSettings
|
||||
StreamSettings *internet.StreamConfig
|
||||
Settings []byte
|
||||
AllowPassiveConnection bool
|
||||
}
|
||||
@@ -58,7 +58,7 @@ type InboundDetourConfig struct {
|
||||
type OutboundDetourConfig struct {
|
||||
Protocol string
|
||||
SendThrough v2net.Address
|
||||
StreamSettings *internet.StreamSettings
|
||||
StreamSettings *internet.StreamConfig
|
||||
Tag string
|
||||
Settings []byte
|
||||
}
|
||||
|
||||
+16
-16
@@ -73,12 +73,12 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
|
||||
func (this *InboundConnectionConfig) UnmarshalJSON(data []byte) error {
|
||||
type JsonConfig struct {
|
||||
Port uint16 `json:"port"`
|
||||
Listen *v2net.AddressPB `json:"listen"`
|
||||
Protocol string `json:"protocol"`
|
||||
StreamSetting *internet.StreamSettings `json:"streamSettings"`
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
AllowPassive bool `json:"allowPassive"`
|
||||
Port uint16 `json:"port"`
|
||||
Listen *v2net.AddressPB `json:"listen"`
|
||||
Protocol string `json:"protocol"`
|
||||
StreamSetting *internet.StreamConfig `json:"streamSettings"`
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
AllowPassive bool `json:"allowPassive"`
|
||||
}
|
||||
|
||||
jsonConfig := new(JsonConfig)
|
||||
@@ -105,10 +105,10 @@ func (this *InboundConnectionConfig) UnmarshalJSON(data []byte) error {
|
||||
|
||||
func (this *OutboundConnectionConfig) UnmarshalJSON(data []byte) error {
|
||||
type JsonConnectionConfig struct {
|
||||
Protocol string `json:"protocol"`
|
||||
SendThrough *v2net.AddressPB `json:"sendThrough"`
|
||||
StreamSetting *internet.StreamSettings `json:"streamSettings"`
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
Protocol string `json:"protocol"`
|
||||
SendThrough *v2net.AddressPB `json:"sendThrough"`
|
||||
StreamSetting *internet.StreamConfig `json:"streamSettings"`
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
}
|
||||
jsonConfig := new(JsonConnectionConfig)
|
||||
if err := json.Unmarshal(data, jsonConfig); err != nil {
|
||||
@@ -194,7 +194,7 @@ func (this *InboundDetourConfig) UnmarshalJSON(data []byte) error {
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
Tag string `json:"tag"`
|
||||
Allocation *InboundDetourAllocationConfig `json:"allocate"`
|
||||
StreamSetting *internet.StreamSettings `json:"streamSettings"`
|
||||
StreamSetting *internet.StreamConfig `json:"streamSettings"`
|
||||
AllowPassive bool `json:"allowPassive"`
|
||||
}
|
||||
jsonConfig := new(JsonInboundDetourConfig)
|
||||
@@ -232,11 +232,11 @@ func (this *InboundDetourConfig) UnmarshalJSON(data []byte) error {
|
||||
|
||||
func (this *OutboundDetourConfig) UnmarshalJSON(data []byte) error {
|
||||
type JsonOutboundDetourConfig struct {
|
||||
Protocol string `json:"protocol"`
|
||||
SendThrough *v2net.AddressPB `json:"sendThrough"`
|
||||
Tag string `json:"tag"`
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
StreamSetting *internet.StreamSettings `json:"streamSettings"`
|
||||
Protocol string `json:"protocol"`
|
||||
SendThrough *v2net.AddressPB `json:"sendThrough"`
|
||||
Tag string `json:"tag"`
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
StreamSetting *internet.StreamConfig `json:"streamSettings"`
|
||||
}
|
||||
jsonConfig := new(JsonOutboundDetourConfig)
|
||||
if err := json.Unmarshal(data, jsonConfig); err != nil {
|
||||
|
||||
Reference in new issue
Block a user