pacproxy 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -3
- data/bin/pacproxy +16 -2
- data/lib/pacproxy/version.rb +1 -1
- data/pacproxy.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 544d350a0f41fbbd036432458ec322674a7699a9
|
4
|
+
data.tar.gz: f719176796dc8ed6e8df8702b704fecd0103e157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e5579ec3c7435b4bd209fba6462809d57e2de1e4d531c6421af2054d7f70d24789583db451648dcb066298431dd0f1a89b6bc3faa9b4d8596efd6add5ef39d0
|
7
|
+
data.tar.gz: d55a68ce7de1ca3bf24a838eb837e89cc148fc72733752432fd049cedd0c63ef5862615cf769d60aa9c26c128d90a1df512907fa611386b66632cf059d60256e
|
data/README.md
CHANGED
@@ -2,24 +2,36 @@
|
|
2
2
|
|
3
3
|
Pacproxy provides http/https proxy routed with proxy.pac.
|
4
4
|
|
5
|
+
**:warning:Now Pacproxy is very early stage, so it might have big change.**
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
|
-
Add this line to your application's Gemfile:
|
9
|
+
Add this line to your application's Gemfile, for example:
|
8
10
|
|
9
11
|
gem 'pacproxy'
|
12
|
+
gem 'therubyracer'
|
10
13
|
|
11
14
|
And then execute:
|
12
15
|
|
13
16
|
$ bundle
|
14
17
|
|
15
|
-
|
18
|
+
## Requirements
|
19
|
+
|
20
|
+
After installing the `pacproxy` gem you must install a JavaScript runtime. Compatible runtimes include
|
21
|
+
(see [pac](https://github.com/samuelkadolph/ruby-pac/blob/master/README.md):
|
16
22
|
|
17
|
-
|
23
|
+
* [therubyracer](https://rubygems.org/gems/therubyracer) Google V8 embedded within Ruby
|
24
|
+
* [therubyrhino](https://rubygems.org/gems/therubyrhino/) Mozilla Rhino embedded within JRuby
|
25
|
+
* [johnson](https://rubygems.org/gems/johnson/) Mozilla SpiderMonkey embedded within Ruby 1.8
|
26
|
+
* [mustang](https://rubygems.org/gems/mustang/) Mustang V8 embedded within Ruby
|
18
27
|
|
19
28
|
## Usage
|
20
29
|
|
21
30
|
$ bundle exec pacproxy -P proxy.pac -p 3128
|
22
31
|
|
32
|
+
or
|
33
|
+
|
34
|
+
$ bundle exec pacproxy -P http://sample.org/proxy.pac -p 3128
|
23
35
|
|
24
36
|
## Contributing
|
25
37
|
|
data/bin/pacproxy
CHANGED
@@ -2,21 +2,35 @@
|
|
2
2
|
|
3
3
|
require 'pacproxy'
|
4
4
|
require 'optparse'
|
5
|
+
require 'logger'
|
5
6
|
|
6
7
|
port = 3128
|
7
8
|
proxy_pac = nil
|
9
|
+
daemonize = false
|
10
|
+
log_file = 'pacproxy.log'
|
8
11
|
|
9
12
|
OptionParser.new do |o|
|
13
|
+
o.on('-d', 'daemonize') { daemonize = true }
|
14
|
+
o.on('-l LOGFILE', String, "specify log file. default: #{log_file}") { |l| log_file = l }
|
10
15
|
o.on('-p PORT', Integer,"specify listening port. default: #{port}") { |p| port = p }
|
11
16
|
o.on('-P PROXYPAC', String, 'specify proxy.pac location') { |pac| proxy_pac = pac }
|
12
17
|
o.on('-h', 'show this help') { puts o; exit }
|
13
18
|
o.parse!
|
14
19
|
end
|
15
20
|
|
16
|
-
|
21
|
+
logger = Logger.new(log_file, 'weekly')
|
22
|
+
logger.level = Logger::DEBUG
|
23
|
+
|
24
|
+
s = Pacproxy::Pacproxy.new(Port: port,
|
25
|
+
Proxypac: proxy_pac,
|
26
|
+
Logger: logger)
|
17
27
|
|
18
28
|
Signal.trap('INT') do
|
19
29
|
s.shutdown
|
20
30
|
end
|
21
31
|
|
22
|
-
|
32
|
+
if daemonize
|
33
|
+
WEBrick::Daemon.start { s.start }
|
34
|
+
else
|
35
|
+
s.start
|
36
|
+
end
|
data/lib/pacproxy/version.rb
CHANGED
data/pacproxy.gemspec
CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'therubyracer', '~> 0.12.1'
|
22
21
|
spec.add_dependency 'pac', '~> 1.0.0'
|
23
22
|
|
24
23
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pacproxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OTA Hiroshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: therubyracer
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.12.1
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 0.12.1
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: pac
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|