bogo 0.1.20 → 0.1.22
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/CHANGELOG.md +3 -0
- data/lib/bogo/http_proxy.rb +19 -0
- data/lib/bogo/version.rb +1 -1
- 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: eacb7f10b81571c766b7759aa06a996ab4ec27e3
|
4
|
+
data.tar.gz: 09e823bcc4bba8a285e77dab4b447b206d22ca30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce3eb6340472885af82320813bb344df09fbf3ce7d5c343df5544c4413b971f89f53d374d9a040c9c47fb2f4daebf654afc138ac4b691b5f01fe1ac98cda1222
|
7
|
+
data.tar.gz: 309fed02b6250c5dafe73388aa2851bd0a7370f13779ae28be0b94b045bd5b79fa70f9f32e5632806ae5a9d9293676fe7510b50962c0ebf7297d932d1d3eed30
|
data/CHANGELOG.md
CHANGED
data/lib/bogo/http_proxy.rb
CHANGED
@@ -9,6 +9,9 @@ require 'http/request'
|
|
9
9
|
class HTTP::Request
|
10
10
|
|
11
11
|
# Override to implicitly apply proxy as required
|
12
|
+
#
|
13
|
+
# NOTE: If dealing with https request, force port so CONNECT request
|
14
|
+
# will properly include destination port
|
12
15
|
def proxy
|
13
16
|
if((@proxy.nil? || @proxy.empty?) && ENV["#{uri.scheme}_proxy"] && proxy_is_allowed?)
|
14
17
|
_proxy = URI.parse(ENV["#{uri.scheme}_proxy"])
|
@@ -36,4 +39,20 @@ class HTTP::Request
|
|
36
39
|
end
|
37
40
|
end
|
38
41
|
|
42
|
+
# Compute HTTP request header SSL proxy connection
|
43
|
+
#
|
44
|
+
# NOTE: Provide override to get port included within request
|
45
|
+
def proxy_connect_header
|
46
|
+
if(@uri.port.nil?)
|
47
|
+
if(@uri.scheme == 'https')
|
48
|
+
dest_port = 443
|
49
|
+
else
|
50
|
+
dest_port = 80
|
51
|
+
end
|
52
|
+
else
|
53
|
+
dest_port = @uri.port
|
54
|
+
end
|
55
|
+
"CONNECT #{@uri.host}:#{dest_port} HTTP/#{version}"
|
56
|
+
end
|
57
|
+
|
39
58
|
end
|
data/lib/bogo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bogo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|