예제 #1
0
        public List <VgcApis.Interfaces.IShareLinkDecoder> GenDecoderList(
            bool isIncludeV2cfgDecoder)
        {
            var decoders = new List <VgcApis.Interfaces.IShareLinkDecoder>
            {
                codecs.GetChild <ShareLinkComponents.VmessDecoder>(),
                codecs.GetChild <ShareLinkComponents.VeeDecoder>(),
            };

            if (setting.CustomDefImportSsShareLink)
            {
                decoders.Add(codecs.GetChild <ShareLinkComponents.SsDecoder>());
            }

            if (isIncludeV2cfgDecoder)
            {
                decoders.Add(codecs.GetChild <ShareLinkComponents.V2cfgDecoder>());
            }

            return(decoders);
        }
예제 #2
0
 public T GetCodec <T>()
     where T : VgcApis.BaseClasses.ComponentOf <ShareLinkComponents.Codecs>
 {
     return(codecs.GetChild <T>());
 }