proxied_request 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -0
- data/lib/proxied_request/config.rb +9 -0
- data/lib/proxied_request/request.rb +2 -0
- data/lib/proxied_request/version.rb +1 -1
- data/proxied_request.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df986a2d5e8acd42ed1282e77d1a26e21464f22894155ca80f81dac6b2ccd733
|
4
|
+
data.tar.gz: fec7e0118b993230dabdb5abd80950a5a5f09093308b2bac4e0988dba46f5760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fcea41f7ba5dd0cf2ba9f459119c8a4f70f7231155ec6cd094e5158f824239b20c982dc9b96b422b360ff0f1f75869b000c238eea1c87cfd321ffad9413da51
|
7
|
+
data.tar.gz: e81669b8302f86dce957d6e28a016586f4ed0067f6c124a7bbb43fb8b3e071bae05d7264b6f690d6e1cd0ae4a8e282b0fd13a356a90b57cd748a8224722d23eb
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -10,10 +10,18 @@ Locate your torrc (**Tor Browser\Browser\TorBrowser\Data\Tor**) file and add the
|
|
10
10
|
SocksPort 127.0.0.1:9050
|
11
11
|
```
|
12
12
|
|
13
|
+
Install the gem:
|
14
|
+
|
15
|
+
```bash
|
16
|
+
gem install proxied_request
|
17
|
+
```
|
18
|
+
|
13
19
|
## Usage
|
14
20
|
|
15
21
|
1. Start tor
|
16
22
|
|
23
|
+
2. Make a request:
|
24
|
+
|
17
25
|
```ruby
|
18
26
|
require 'proxied_request'
|
19
27
|
|
@@ -25,5 +33,6 @@ puts response.body # =>
|
|
25
33
|
config = ProxiedRequest::Config.new
|
26
34
|
config.set_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0')
|
27
35
|
config.type = MethodType::POST
|
36
|
+
config.body = 'foo=bar'
|
28
37
|
response = ProxiedRequest::HTTP.request('https://api.ipify.org', config)
|
29
38
|
puts response.body # =>
|
@@ -11,10 +11,15 @@ module ProxiedRequest
|
|
11
11
|
@type = MethodType::GET
|
12
12
|
|
13
13
|
@headers = {}
|
14
|
+
@body = nil
|
14
15
|
|
15
16
|
@timeout = 10
|
16
17
|
end
|
17
18
|
|
19
|
+
def body=(body)
|
20
|
+
@body = body
|
21
|
+
end
|
22
|
+
|
18
23
|
def type=(type)
|
19
24
|
@type = type
|
20
25
|
end
|
@@ -54,5 +59,9 @@ module ProxiedRequest
|
|
54
59
|
def get_type
|
55
60
|
@type
|
56
61
|
end
|
62
|
+
|
63
|
+
def get_body
|
64
|
+
@body
|
65
|
+
end
|
57
66
|
end
|
58
67
|
end
|
data/proxied_request.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["plusleft"]
|
9
9
|
spec.email = ["107749872+0xleft@users.noreply.github.com"]
|
10
10
|
|
11
|
-
spec.summary = "Make HTTP requests through a proxy."
|
11
|
+
spec.summary = "Make HTTP requests through a tor as proxy."
|
12
12
|
spec.homepage = "https://github.com/0xleft/proxiedrequest"
|
13
13
|
spec.license = "MIT"
|
14
14
|
spec.required_ruby_version = ">= 2.6.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proxied_request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- plusleft
|
@@ -54,5 +54,5 @@ requirements: []
|
|
54
54
|
rubygems_version: 3.4.10
|
55
55
|
signing_key:
|
56
56
|
specification_version: 4
|
57
|
-
summary: Make HTTP requests through a proxy.
|
57
|
+
summary: Make HTTP requests through a tor as proxy.
|
58
58
|
test_files: []
|