proxifier-fork 1.0.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +14 -3
- data/lib/proxifier/proxies/http.rb +1 -1
- data/lib/proxifier/proxies/socks.rb +1 -1
- data/lib/proxifier/proxies/socks4.rb +1 -1
- data/lib/proxifier/proxies/socks4a.rb +2 -1
- data/lib/proxifier/proxy.rb +2 -1
- data/lib/proxifier/version.rb +1 -1
- data/lib/proxifier.rb +11 -8
- data/lib/uri/socks.rb +22 -8
- metadata +11 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3406c5425bc8ac8f85638bc6f1d4a7a34c856c97bb736068626f28b87a5a6d6a
|
4
|
+
data.tar.gz: 5adb728639edebd3b92e55764bd473b62347932cd120854ca67250cd79d6cf88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d876a8b2217c3ccae0baf110d5fb5648ecfeec58df773f98c112118362a5a6527e2eff7f6368c7345344fe4284b19c5775f3c8895e52ff8f8496e015cfff5298
|
7
|
+
data.tar.gz: b87e9fe9a646864abaef9cedbb5f7f157d933fb357b6242653cf58315242333b3de47e27edfa7d7da6a4784df12e82c56a8bca47a40996ceca1c54c8e24714d5
|
data/README.md
CHANGED
@@ -1,17 +1,28 @@
|
|
1
1
|
# ruby-proxifier
|
2
2
|
|
3
|
+
## Fork status
|
4
|
+
|
5
|
+
This is a fork of https://github.com/samuelkadolph/ruby-proxifier
|
6
|
+
|
7
|
+
Changes in the fork:
|
8
|
+
|
9
|
+
- **v1.1.0:** Fix schemes to work with Ruby >= 3.1. Remove use of autoload.
|
10
|
+
|
11
|
+
- **v1.0.4:** Allow customizing HTTP User-Agent header sent when connecting to
|
12
|
+
proxy.
|
13
|
+
|
3
14
|
## Installing
|
4
15
|
|
5
16
|
### Recommended
|
6
17
|
|
7
18
|
```
|
8
|
-
gem install proxifier
|
19
|
+
gem install proxifier-fork
|
9
20
|
```
|
10
21
|
|
11
22
|
### Edge
|
12
23
|
|
13
24
|
```
|
14
|
-
git clone https://github.com/
|
25
|
+
git clone https://github.com/ab/ruby-proxifier
|
15
26
|
cd ruby-proxifier && rake install
|
16
27
|
```
|
17
28
|
|
@@ -76,7 +87,7 @@ precedence):
|
|
76
87
|
### Ruby
|
77
88
|
|
78
89
|
```ruby
|
79
|
-
require "proxifier
|
90
|
+
require "proxifier"
|
80
91
|
|
81
92
|
proxy = Proxifier::Proxy("socks://localhost")
|
82
93
|
socket = proxy.open("www.google.com", 80)
|
data/lib/proxifier/proxy.rb
CHANGED
data/lib/proxifier/version.rb
CHANGED
data/lib/proxifier.rb
CHANGED
@@ -1,15 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "uri"
|
2
|
-
|
4
|
+
require_relative "uri/socks"
|
3
5
|
|
4
|
-
|
5
|
-
require "proxifier/version"
|
6
|
+
require_relative "proxifier/version"
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
require_relative "proxifier/proxy"
|
9
|
+
require_relative "proxifier/proxies/http"
|
10
|
+
require_relative "proxifier/proxies/socks"
|
11
|
+
require_relative "proxifier/proxies/socks"
|
12
|
+
require_relative "proxifier/proxies/socks4"
|
13
|
+
require_relative "proxifier/proxies/socks4a"
|
12
14
|
|
15
|
+
module Proxifier
|
13
16
|
def self.Proxy(url, options = {})
|
14
17
|
url = URI.parse(url)
|
15
18
|
|
data/lib/uri/socks.rb
CHANGED
@@ -1,18 +1,32 @@
|
|
1
|
-
require
|
1
|
+
require 'uri/generic'
|
2
2
|
|
3
3
|
module URI
|
4
|
-
class
|
4
|
+
class Socks < Generic
|
5
5
|
DEFAULT_PORT = 1080
|
6
6
|
COMPONENT = [:scheme, :userinfo, :host, :port, :query].freeze
|
7
|
+
|
8
|
+
def self.build(args)
|
9
|
+
tmp = Util.make_components_hash(self, args)
|
10
|
+
super(tmp)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class Socks4 < Socks
|
7
15
|
end
|
8
|
-
@@schemes["SOCKS"] = SOCKS
|
9
|
-
@@schemes["SOCKS5"] = SOCKS
|
10
16
|
|
11
|
-
class
|
17
|
+
class Socks4A < Socks
|
12
18
|
end
|
13
|
-
@@schemes["SOCKS4"] = SOCKS4
|
14
19
|
|
15
|
-
|
20
|
+
mapping = {
|
21
|
+
'SOCKS' => Socks,
|
22
|
+
'SOCKS5' => Socks,
|
23
|
+
'SOCKS4' => Socks4,
|
24
|
+
'SOCKS4A' => Socks4A
|
25
|
+
}
|
26
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
|
27
|
+
mapping.each { |scheme, class_name| register_scheme scheme, class_name }
|
28
|
+
else
|
29
|
+
mapping.each { |scheme, class_name| @@schemes[scheme] = class_name }
|
16
30
|
end
|
17
|
-
@@schemes["SOCKS4A"] = SOCKS4A
|
18
31
|
end
|
32
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxifier-fork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Kadolph
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -25,8 +25,12 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
|
-
description:
|
29
|
-
|
28
|
+
description: |2
|
29
|
+
Proxifier adds support for HTTP or SOCKS proxies and lets you force TCPSocket to use proxies.
|
30
|
+
|
31
|
+
This is a fork of proxifier https://github.com/samuelkadolph/ruby-proxifier
|
32
|
+
|
33
|
+
The fork allows the gem to run on modern ruby versions and adds some minor features.
|
30
34
|
email:
|
31
35
|
- samuel@kadolph.com
|
32
36
|
- git@abrody.com
|
@@ -50,7 +54,8 @@ files:
|
|
50
54
|
- lib/proxifier/version.rb
|
51
55
|
- lib/uri/socks.rb
|
52
56
|
homepage: https://github.com/ab/ruby-proxifier
|
53
|
-
licenses:
|
57
|
+
licenses:
|
58
|
+
- MIT
|
54
59
|
metadata: {}
|
55
60
|
post_install_message:
|
56
61
|
rdoc_options: []
|
@@ -67,8 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
72
|
- !ruby/object:Gem::Version
|
68
73
|
version: '0'
|
69
74
|
requirements: []
|
70
|
-
|
71
|
-
rubygems_version: 2.4.5.1
|
75
|
+
rubygems_version: 3.4.19
|
72
76
|
signing_key:
|
73
77
|
specification_version: 4
|
74
78
|
summary: Proxifier is a gem to force ruby to use a proxy.
|