mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-30 23:37:44 +00:00
option to allow passive connection
This commit is contained in:
18 files changed
+76
-47
No files matched your search
@@ -71,6 +71,7 @@ func (this *InboundConnectionConfig) UnmarshalJSON(data []byte) error {
|
||||
Protocol string `json:"protocol"`
|
||||
StreamSetting *internet.StreamSettings `json:"streamSettings"`
|
||||
Settings json.RawMessage `json:"settings"`
|
||||
AllowPassive bool `json:"allowPassive"`
|
||||
}
|
||||
|
||||
jsonConfig := new(JsonConfig)
|
||||
@@ -91,6 +92,7 @@ func (this *InboundConnectionConfig) UnmarshalJSON(data []byte) error {
|
||||
|
||||
this.Protocol = jsonConfig.Protocol
|
||||
this.Settings = jsonConfig.Settings
|
||||
this.AllowPassiveConnection = jsonConfig.AllowPassive
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -186,6 +188,7 @@ func (this *InboundDetourConfig) UnmarshalJSON(data []byte) error {
|
||||
Tag string `json:"tag"`
|
||||
Allocation *InboundDetourAllocationConfig `json:"allocate"`
|
||||
StreamSetting *internet.StreamSettings `json:"streamSettings"`
|
||||
AllowPassive bool `json:"allowPassive"`
|
||||
}
|
||||
jsonConfig := new(JsonInboundDetourConfig)
|
||||
if err := json.Unmarshal(data, jsonConfig); err != nil {
|
||||
@@ -216,6 +219,7 @@ func (this *InboundDetourConfig) UnmarshalJSON(data []byte) error {
|
||||
if jsonConfig.StreamSetting != nil {
|
||||
this.StreamSettings = jsonConfig.StreamSetting
|
||||
}
|
||||
this.AllowPassiveConnection = jsonConfig.AllowPassive
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user