girl 0.82.0 → 0.83.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of girl might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5ece81dea98cedfec3abf108fa4acf0b9ca1d465251f31aa581f3540d71b252
4
- data.tar.gz: 5d245931a0540927accdaff5d350d45b003b7433e7891e7cefc855055e358a63
3
+ metadata.gz: 28c02739bfb0608617fa46ef36d80d7ba9c84753eb3c34410eb98f05cab430f1
4
+ data.tar.gz: 94a70957768e52b1e40782c0df53451e1caebcac096829648009c6977219dd8b
5
5
  SHA512:
6
- metadata.gz: d12d73e8fc0a585697fe0c21e91f70dce42606c30e3b9cde74c6430c00ce5aa3e36773bd68cffe4e3c94746fd48d42978a003b1863372f87b11f250c4a25b3b5
7
- data.tar.gz: 1238736ccfdccf480058a353883dcedc22848f43230904c7b1419876c8d7f18fba04ff8aa8c57b67fd26b4908b50f0027021c2edfb828525a6e4248040e81ea4
6
+ metadata.gz: d0e12984275ddf891c11b75ce86d13830798d2538b9b4b15962720ac268f61dc721d1fd355f99282f6274217879e1053d698dbcdaf59de30533fe59c53596173
7
+ data.tar.gz: dc98d8959fd53fc51f8e0e2851ce46afe78a7ddedf293a595148b885a8ed2055a7e1fa92e88b22826528e0a6399ff5c16700c689bf4a766a6d7ca809567e0a1d
@@ -108,7 +108,7 @@ module Girl
108
108
  raise "not found direct file #{ direct_path }"
109
109
  end
110
110
 
111
- directs = ( [ Addrinfo.ip( proxyd_host ).ip_address ] + RESERVED_ROUTE.split( "\n" ) + IO.binread( direct_path ).split( "\n" ) ).map { | line | IPAddr.new( line.strip ) }
111
+ directs = ( RESERVED_ROUTE.split( "\n" ) + IO.binread( direct_path ).split( "\n" ) ).map { | line | IPAddr.new( line.strip ) }
112
112
  end
113
113
 
114
114
  remotes = []
@@ -264,8 +264,10 @@ module Girl
264
264
  # deal with destination ip
265
265
  #
266
266
  def deal_with_destination_ip( src, ip_info )
267
- if @directs.any? { | direct | direct.include?( ip_info.ip_address ) }
268
- # ip命中直连列表,直连
267
+ src_info = @src_infos[ src ]
268
+
269
+ if ( @directs.any? { | direct | direct.include?( ip_info.ip_address ) } ) || ( ( src_info[ :destination_domain ] == @proxyd_host ) && ![ 80, 443 ].include?( src_info[ :destination_port ] ) )
270
+ # ip命中直连列表,或者访问远端非80/443端口,直连
269
271
  # puts "debug1 #{ ip_info.inspect } hit directs"
270
272
  new_a_dst( src, ip_info )
271
273
  else
@@ -1,3 +1,3 @@
1
1
  module Girl
2
- VERSION = '0.82.0'.freeze
2
+ VERSION = '0.83.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: girl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.82.0
4
+ version: 0.83.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takafan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-02 00:00:00.000000000 Z
11
+ date: 2020-09-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: while internet is evil, here's a girl.
14
14
  email: