girl 0.95.0 → 0.96.0

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 995e842429be7063ce5e29248927b336029f2e4dc864e4855979770d18ff7766
4
- data.tar.gz: 83b4619a2b8cf5f99058282345478eee57a2b7638cefafa5a15d1d0170abfb96
3
+ metadata.gz: 141ddfd9fd89d13f02f9ea69e9880d39620460ae1ff5155276c1b4bcb2b3ed83
4
+ data.tar.gz: f72985c0577b97927e73c6943f268df9ca92702eb2d84f5f5a4400e4bf93dee3
5
5
  SHA512:
6
- metadata.gz: 349a7012c29fd90bae97816b1af481d25623f580969f3ec354c0b747c43aea805bba0b02f8ebb8e653427b12fa5af07584fc3566ddb67bd48fd04947b4386fcf
7
- data.tar.gz: c078531bb08ed0568e28170336c2a10b8b22896b2138bfdc149d9f61758cae938816ea623f7b4e7bab89e48620c855c731c4c3fdb2485573f2706125e9602b7c
6
+ metadata.gz: 67dc320dc6ef439a146c7396f9a80d6031c5a6cad3d4f36fb23063898fd68c6c6f2a0789cbd51d553a2fcb856d52da826d37f6470f1b5ac83703147809d30341
7
+ data.tar.gz: 25189cbab69f1d2345a62efb8898f2410c7de3210a06d04547e2cb01decdc31afc3ff56e5ab98356fdb378d1d5afb95f40792fd96e02c05bf8ff0431ea32d18d
@@ -37,7 +37,6 @@ module Girl
37
37
  rs, ws = IO.select( @reads, @writes )
38
38
 
39
39
  @mutex.synchronize do
40
- # 先读,再写,避免打上关闭标记后读到
41
40
  rs.each do | sock |
42
41
  case @roles[ sock ]
43
42
  when :dotr then
@@ -554,9 +553,7 @@ module Girl
554
553
  end
555
554
 
556
555
  # puts "debug1 a new dst #{ dst.local_address.inspect }"
557
- local_port = dst.local_address.ip_port
558
556
  dst_info = {
559
- local_port: local_port, # 本地端口
560
557
  src: src, # 对应src
561
558
  domain: domain, # 目的地
562
559
  wbuff: '', # 写前,从src读到的流量
@@ -785,11 +782,11 @@ module Girl
785
782
  def set_dst_closing( dst )
786
783
  return if dst.closed?
787
784
  dst_info = @dst_infos[ dst ]
788
- dst_info[ :closing ] = true
789
-
785
+
790
786
  if dst_info[ :closed_write ] then
791
- add_read( dst )
787
+ close_dst( dst )
792
788
  else
789
+ dst_info[ :closing ] = true
793
790
  @reads.delete( dst )
794
791
  add_write( dst )
795
792
  end
@@ -814,11 +811,11 @@ module Girl
814
811
  def set_src_closing( src )
815
812
  return if src.closed?
816
813
  src_info = @src_infos[ src ]
817
- src_info[ :closing ] = true
818
814
 
819
815
  if src_info[ :closed_write ] then
820
- add_read( src )
816
+ close_src( src )
821
817
  else
818
+ src_info[ :closing ] = true
822
819
  @reads.delete( src )
823
820
  add_write( src )
824
821
  end
@@ -39,7 +39,6 @@ module Girl
39
39
  rs, ws = IO.select( @reads, @writes )
40
40
 
41
41
  @mutex.synchronize do
42
- # 先读,再写,避免打上关闭标记后读到
43
42
  rs.each do | sock |
44
43
  case @roles[ sock ]
45
44
  when :dotr then
@@ -544,11 +543,11 @@ module Girl
544
543
  def set_dst_closing( dst )
545
544
  return if dst.closed?
546
545
  dst_info = @dst_infos[ dst ]
547
- dst_info[ :closing ] = true
548
546
 
549
547
  if dst_info[ :closed_write ] then
550
- add_read( dst )
548
+ close_dst( dst )
551
549
  else
550
+ dst_info[ :closing ] = true
552
551
  @reads.delete( dst )
553
552
  add_write( dst )
554
553
  end
@@ -573,11 +572,11 @@ module Girl
573
572
  def set_streamd_closing( streamd )
574
573
  return if streamd.closed?
575
574
  streamd_info = @streamd_infos[ streamd ]
576
- streamd_info[ :closing ] = true
577
575
 
578
576
  if streamd_info[ :closed_write ] then
579
- add_read( streamd )
577
+ close_streamd( streamd )
580
578
  else
579
+ streamd_info[ :closing ] = true
581
580
  @reads.delete( streamd )
582
581
  add_write( streamd )
583
582
  end
@@ -1,3 +1,3 @@
1
1
  module Girl
2
- VERSION = '0.95.0'.freeze
2
+ VERSION = '0.96.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.95.0
4
+ version: 0.96.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-10-15 00:00:00.000000000 Z
11
+ date: 2020-10-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: escape evil.
14
14
  email: