Browse Source

Do not cause error when `json:"fallback"` is `null` (#361)

Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
pull/365/head
Raymond Luo 4 years ago committed by GitHub
parent
commit
fcc9d97074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      infra/conf/trojan.go
  2. 2
      infra/conf/vless.go

2
infra/conf/trojan.go

@ -104,7 +104,7 @@ type TrojanUserConfig struct {
// TrojanServerConfig is Inbound configuration // TrojanServerConfig is Inbound configuration
type TrojanServerConfig struct { type TrojanServerConfig struct {
Clients []*TrojanUserConfig `json:"clients"` Clients []*TrojanUserConfig `json:"clients"`
Fallback json.RawMessage `json:"fallback"` Fallback *TrojanInboundFallback `json:"fallback"`
Fallbacks []*TrojanInboundFallback `json:"fallbacks"` Fallbacks []*TrojanInboundFallback `json:"fallbacks"`
} }

2
infra/conf/vless.go

@ -29,7 +29,7 @@ type VLessInboundFallback struct {
type VLessInboundConfig struct { type VLessInboundConfig struct {
Clients []json.RawMessage `json:"clients"` Clients []json.RawMessage `json:"clients"`
Decryption string `json:"decryption"` Decryption string `json:"decryption"`
Fallback json.RawMessage `json:"fallback"` Fallback *VLessInboundFallback `json:"fallback"`
Fallbacks []*VLessInboundFallback `json:"fallbacks"` Fallbacks []*VLessInboundFallback `json:"fallbacks"`
} }

Loading…
Cancel
Save