mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 00:51:12 +03:00
Add shadowtls (#49)
* Add shadowtls outbound * Add shadowtls inbound * Add shadowtls example * Add shadowtls documentation
This commit is contained in:
@@ -20,6 +20,7 @@ type _Outbound struct {
|
||||
HysteriaOptions HysteriaOutboundOptions `json:"-"`
|
||||
TorOptions TorOutboundOptions `json:"-"`
|
||||
SSHOptions SSHOutboundOptions `json:"-"`
|
||||
ShadowTLSOptions ShadowTLSOutboundOptions `json:"-"`
|
||||
SelectorOptions SelectorOutboundOptions `json:"-"`
|
||||
}
|
||||
|
||||
@@ -50,6 +51,8 @@ func (h Outbound) MarshalJSON() ([]byte, error) {
|
||||
v = h.TorOptions
|
||||
case C.TypeSSH:
|
||||
v = h.SSHOptions
|
||||
case C.TypeShadowTLS:
|
||||
v = h.ShadowTLSOptions
|
||||
case C.TypeSelector:
|
||||
v = h.SelectorOptions
|
||||
default:
|
||||
@@ -87,6 +90,8 @@ func (h *Outbound) UnmarshalJSON(bytes []byte) error {
|
||||
v = &h.TorOptions
|
||||
case C.TypeSSH:
|
||||
v = &h.SSHOptions
|
||||
case C.TypeShadowTLS:
|
||||
v = &h.ShadowTLSOptions
|
||||
case C.TypeSelector:
|
||||
v = &h.SelectorOptions
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user