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

Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
This commit is contained in:
Raymond Luo 2021-03-11 00:17:27 +08:00 committed by GitHub
parent 439c91d509
commit fcc9d97074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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"`
} }

View File

@ -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"`
} }