phantom_proxy 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/phantom_proxy +9 -2
- data/lib/phantom_proxy/version.rb +1 -1
- data/lib/phantom_proxy.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0eb289ff10597ddb812b7c0f9aebcc0b0f292394
|
4
|
+
data.tar.gz: db10b832ce00186c0c60a1adf31e52725baf578d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 734e8f48611f47f89a1993af1510e49e5f066e7c5b75c83e0cec930b449917956e71f6af7a420e89a5df900414264bfb87ae7ae36bd82c6923f63ea67154e65e
|
7
|
+
data.tar.gz: 69d0d566be8ccc235592368780b7d9c3f7be43076474ba48b7d66ba7696782517de18150a55e77f92604dc23b115cf3068e563c5fbcaf35a9d317e668b6359ac
|
data/bin/phantom_proxy
CHANGED
@@ -17,6 +17,9 @@ module PhantomProxy
|
|
17
17
|
# PhantomProxy2.hmac_key = hmac
|
18
18
|
options[:hmac_key] = hmac
|
19
19
|
end
|
20
|
+
opts.on('--threadpool_size [INTEGER]', 'Specify this value to use a specific threadpool_size' ) do |threadpool_size|
|
21
|
+
options[:threadpool_size] = threadpool_size
|
22
|
+
end
|
20
23
|
end
|
21
24
|
args = ARGV.dup
|
22
25
|
remaining = []
|
@@ -29,12 +32,16 @@ module PhantomProxy
|
|
29
32
|
retry
|
30
33
|
end
|
31
34
|
end
|
32
|
-
PhantomProxy.logger
|
33
|
-
PhantomProxy.hmac_key
|
35
|
+
PhantomProxy.logger = Logger.new(options[:log_file]) if options[:log_file]
|
36
|
+
PhantomProxy.hmac_key = options[:hmac_key] if options[:hmac_key] && options[:hmac_key] != "none"
|
37
|
+
PhantomProxy.threadpool_size = options[:threadpool_size] if options[:threadpool_size]
|
34
38
|
remaining
|
35
39
|
end
|
36
40
|
def self.run_phantom_proxy(args)
|
37
41
|
puts "Run with #{args}"
|
42
|
+
|
43
|
+
EM.threadpool_size = PhantomProxy.threadpool_size if PhantomProxy.threadpool_size
|
44
|
+
|
38
45
|
runner = Goliath::Runner.new(args, nil)
|
39
46
|
runner.logger=PhantomProxy.logger
|
40
47
|
runner.port = PhantomProxy.port if PhantomProxy.respond_to?(:port)
|
data/lib/phantom_proxy.rb
CHANGED
@@ -86,6 +86,14 @@ module PhantomProxy
|
|
86
86
|
@always_iframe=obj
|
87
87
|
end
|
88
88
|
|
89
|
+
def self.threadpool_size=(obj)
|
90
|
+
@threadpool_size=obj.to_i
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.threadpool_size
|
94
|
+
@threadpool_size
|
95
|
+
end
|
96
|
+
|
89
97
|
def self.wait_for(op = nil)
|
90
98
|
fiber = Fiber.current
|
91
99
|
EM.defer(op, Proc.new {|result|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phantom_proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suddani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|