File tree Expand file tree Collapse file tree 1 file changed +1
-46
lines changed Expand file tree Collapse file tree 1 file changed +1
-46
lines changed Original file line number Diff line number Diff line change @@ -272,52 +272,7 @@ const generateDns = (
272
272
}
273
273
274
274
const _adaptToStableBranch = ( config : Recordable ) => {
275
- config . outbounds . push (
276
- {
277
- type : 'direct' ,
278
- tag : 'direct' ,
279
- } ,
280
- {
281
- type : 'dns' ,
282
- tag : 'dns-out' ,
283
- } ,
284
- {
285
- type : 'block' ,
286
- tag : 'block' ,
287
- } ,
288
- )
289
- config . route . rules = config . route . rules . flatMap ( ( rule : any ) => {
290
- if ( rule . action === RuleAction . Sniff ) {
291
- if ( rule . inbound ) {
292
- const inbound = config . inbounds . find ( ( v : any ) => v . tag === rule . inbound )
293
- if ( inbound ) {
294
- inbound . sniff = true
295
- }
296
- }
297
- return [ ]
298
- } else if ( rule . action === RuleAction . Resolve ) {
299
- if ( rule . inbound ) {
300
- const inbound = config . inbounds . find ( ( v : any ) => v . tag === rule . inbound )
301
- if ( inbound ) {
302
- inbound . domain_strategy = rule . strategy
303
- }
304
- }
305
- return [ ]
306
- } else if ( rule . action === RuleAction . Reject ) {
307
- rule . outbound = 'block'
308
- } else if ( rule . action === RuleAction . HijackDNS ) {
309
- rule . outbound = 'dns-out'
310
- }
311
- rule . action = undefined
312
- return rule
313
- } )
314
-
315
- config . dns . rules . forEach ( ( rule : any ) => {
316
- if ( rule . action === RuleAction . Reject ) {
317
- rule . outbound = 'block'
318
- }
319
- rule . action = undefined
320
- } )
275
+ config
321
276
}
322
277
323
278
export const generateConfig = async ( originalProfile : IProfile , adaptToStableCore ?: boolean ) => {
You can’t perform that action at this time.
0 commit comments