Skip to content

Commit

Permalink
fix: custom rule (#3145)
Browse files Browse the repository at this point in the history
  • Loading branch information
Halo authored Mar 27, 2023
1 parent e33e594 commit f5f5071
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ yml_other_set()
if Value_1 != false then
if Value_1.class.to_s == 'Hash' then
if not Value_1['rules'].to_a.empty? and Value_1['rules'].class.to_s == 'Array' then
Value_1.each{|x|
Value_1['rules'].each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
Expand Down Expand Up @@ -635,7 +635,7 @@ yml_other_set()
if Value['rules'].to_a.empty? then
if Value_2.class.to_s == 'Hash' then
if not Value_2['rules'].to_a.empty? and Value_2['rules'].class.to_s == 'Array' then
Value_2.each{|x|
Value_2['rules'].each{|x|
if ${10} != 1 then
if x =~ /(^GEOSITE,|^AND,|^OR,|^NOT,|^IP-SUFFIX,|^SRC-IP-SUFFIX,|^IN-TYPE,|^SUB-RULE,|PORT,[0-9]+\/+|PORT,[0-9]+-+)/ or x.split(',')[-1] == 'tcp' or x.split(',')[-1] == 'udp' then
puts '${LOGTIME} Warning: Skip the Custom Rule that Core not Support【' + x + '】'
Expand Down

0 comments on commit f5f5071

Please sign in to comment.