github.com/imannamdari/v2ray-core/v5@v5.0.5/infra/conf/v5cfg/skeleton.go (about) 1 package v5cfg 2 3 import ( 4 "encoding/json" 5 6 "github.com/imannamdari/v2ray-core/v5/infra/conf/cfgcommon" 7 "github.com/imannamdari/v2ray-core/v5/infra/conf/cfgcommon/muxcfg" 8 "github.com/imannamdari/v2ray-core/v5/infra/conf/cfgcommon/proxycfg" 9 "github.com/imannamdari/v2ray-core/v5/infra/conf/cfgcommon/sniffer" 10 "github.com/imannamdari/v2ray-core/v5/infra/conf/cfgcommon/socketcfg" 11 ) 12 13 type RootConfig struct { 14 LogConfig json.RawMessage `json:"log"` 15 DNSConfig json.RawMessage `json:"dns"` 16 RouterConfig json.RawMessage `json:"router"` 17 Inbounds []InboundConfig `json:"inbounds"` 18 Outbounds []OutboundConfig `json:"outbounds"` 19 Services map[string]json.RawMessage `json:"services"` 20 Extensions []json.RawMessage `json:"extension"` 21 } 22 23 type InboundConfig struct { 24 Protocol string `json:"protocol"` 25 PortRange *cfgcommon.PortRange `json:"port"` 26 ListenOn *cfgcommon.Address `json:"listen"` 27 Settings json.RawMessage `json:"settings"` 28 Tag string `json:"tag"` 29 SniffingConfig *sniffer.SniffingConfig `json:"sniffing"` 30 StreamSetting *StreamConfig `json:"streamSettings"` 31 } 32 33 type OutboundConfig struct { 34 Protocol string `json:"protocol"` 35 SendThrough *cfgcommon.Address `json:"sendThrough"` 36 Tag string `json:"tag"` 37 Settings json.RawMessage `json:"settings"` 38 StreamSetting *StreamConfig `json:"streamSettings"` 39 ProxySettings *proxycfg.ProxyConfig `json:"proxySettings"` 40 MuxSettings *muxcfg.MuxConfig `json:"mux"` 41 } 42 43 type StreamConfig struct { 44 Transport string `json:"transport"` 45 TransportSettings json.RawMessage `json:"transportSettings"` 46 Security string `json:"security"` 47 SecuritySettings json.RawMessage `json:"securitySettings"` 48 SocketSettings socketcfg.SocketConfig `json:"socketSettings"` 49 }