@@ -31,8 +31,6 @@ public record CoreConfigContextBuilderAllResult(
3131 public CoreConfigContext ResolvedMainContext => PreSocksResult is not null
3232 ? MainResult . Context with
3333 {
34- TunProtectSsPort = PreSocksResult . Context . TunProtectSsPort ,
35- ProxyRelaySsPort = PreSocksResult . Context . ProxyRelaySsPort ,
3634 ProtectDomainList = [ .. MainResult . Context . ProtectDomainList ?? [ ] , .. PreSocksResult . Context . ProtectDomainList ?? [ ] ] ,
3735 }
3836 : MainResult . Context ;
@@ -58,8 +56,6 @@ public static async Task<CoreConfigContextBuilderResult> Build(Config config, Pr
5856 IsTunEnabled = config . TunModeItem . EnableTun ,
5957 SimpleDnsItem = config . SimpleDNSItem ,
6058 ProtectDomainList = [ ] ,
61- TunProtectSsPort = 0 ,
62- ProxyRelaySsPort = 0 ,
6359 RawDnsItem = await AppManager . Instance . GetDNSItem ( coreType ) ,
6460 RoutingItem = await ConfigHandler . GetDefaultRouting ( config ) ,
6561 } ;
@@ -148,37 +144,7 @@ public static async Task<CoreConfigContextBuilderAllResult> BuildAll(Config conf
148144 } ;
149145 }
150146
151- if ( ! nodeContext . IsTunEnabled
152- || coreType != ECoreType . Xray
153- || node . ConfigType == EConfigType . Custom )
154- {
155- return null ;
156- }
157-
158- var tunProtectSsPort = Utils . GetFreePort ( ) ;
159- var proxyRelaySsPort = Utils . GetFreePort ( ) ;
160- var preItem = new ProfileItem ( )
161- {
162- CoreType = ECoreType . sing_box ,
163- ConfigType = EConfigType . Shadowsocks ,
164- Address = Global . Loopback ,
165- Port = proxyRelaySsPort ,
166- Password = Global . None ,
167- } ;
168- preItem . SetProtocolExtra ( preItem . GetProtocolExtra ( ) with
169- {
170- SsMethod = Global . None ,
171- } ) ;
172- var preResult2 = await Build ( nodeContext . AppConfig , preItem ) ;
173- return preResult2 with
174- {
175- Context = preResult2 . Context with
176- {
177- ProtectDomainList = [ .. nodeContext . ProtectDomainList ?? [ ] , .. preResult2 . Context . ProtectDomainList ?? [ ] ] ,
178- TunProtectSsPort = tunProtectSsPort ,
179- ProxyRelaySsPort = proxyRelaySsPort ,
180- }
181- } ;
147+ return null ;
182148 }
183149
184150 /// <summary>
0 commit comments