hidemyass2 1.0.0 → 1.0.1
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 +2 -2
- data/lib/hidemyass/proxy.rb +26 -5
- data/lib/hidemyass/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81daf30436f054fe6c5d00d0a65f3278e5225b7d
|
|
4
|
+
data.tar.gz: a8bc68d272b7e71af5808c8fc13bf03764c1cfc0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d17a7c7a96096f8dd132c15c819c34962ff5298d5ec178d64729edf15386b229cc069e85b15379190ba96dd6ea1b60c553cba3a1dc5e986d1b3c1580f094837b
|
|
7
|
+
data.tar.gz: 47d567766e3f75ce23edc547570cfd08dfeb823a7520de4061bbf50f6db582a62d321e4b2b786c40285847357dbd152f9131a20ddd077ad85d2be74549277c01
|
data/README.md
CHANGED
|
@@ -53,10 +53,10 @@ require 'hidemyass'
|
|
|
53
53
|
# pp - Per Page. 0..3 = 10, 25, 50, 100.
|
|
54
54
|
# sortBy - Sort by. Defaults to date.
|
|
55
55
|
|
|
56
|
-
proxies = HideMyAss.proxies 'c[]' => '
|
|
56
|
+
proxies = HideMyAss.proxies 'c[]' => 'France', sortBy: 'response_time'
|
|
57
57
|
|
|
58
58
|
proxies.first.country
|
|
59
|
-
# => '
|
|
59
|
+
# => 'france'
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Visit http://proxylist.hidemyass.com for more informations how to filter.
|
data/lib/hidemyass/proxy.rb
CHANGED
|
@@ -68,11 +68,11 @@ module HideMyAss
|
|
|
68
68
|
@port ||= @row.at_xpath('td[3]').text.strip.to_i
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
# The country where the proxy is hosted.
|
|
71
|
+
# The country where the proxy is hosted in downcase letters.
|
|
72
72
|
#
|
|
73
73
|
# @return [ String ]
|
|
74
74
|
def country
|
|
75
|
-
@country ||= @row.at_xpath('td[4]').text.strip
|
|
75
|
+
@country ||= @row.at_xpath('td[4]').text.strip.downcase
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
# The average response time in milliseconds.
|
|
@@ -92,7 +92,7 @@ module HideMyAss
|
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
# The network protocol in in downcase letters.
|
|
95
|
-
# (https or http or
|
|
95
|
+
# (https or http or socks)
|
|
96
96
|
#
|
|
97
97
|
# @return [ String ]
|
|
98
98
|
def type
|
|
@@ -101,11 +101,12 @@ module HideMyAss
|
|
|
101
101
|
|
|
102
102
|
alias protocol type
|
|
103
103
|
|
|
104
|
-
# The level of anonymity
|
|
104
|
+
# The level of anonymity in downcase letters.
|
|
105
|
+
# (low, medium, high, ...)
|
|
105
106
|
#
|
|
106
107
|
# @return [ String ]
|
|
107
108
|
def anonymity
|
|
108
|
-
@anonymity ||= @row.at_xpath('td[8]').text.strip
|
|
109
|
+
@anonymity ||= @row.at_xpath('td[8]').text.strip.downcase
|
|
109
110
|
end
|
|
110
111
|
|
|
111
112
|
# The complete URL of that proxy server.
|
|
@@ -122,6 +123,13 @@ module HideMyAss
|
|
|
122
123
|
ip.split('.').reject(&:empty?).count == 4
|
|
123
124
|
end
|
|
124
125
|
|
|
126
|
+
# If the proxy's network protocol is HTTP.
|
|
127
|
+
#
|
|
128
|
+
# @return [ Boolean ]
|
|
129
|
+
def http?
|
|
130
|
+
protocol == 'http'
|
|
131
|
+
end
|
|
132
|
+
|
|
125
133
|
# If the proxy's network protocol is HTTPS.
|
|
126
134
|
#
|
|
127
135
|
# @return [ Boolean ]
|
|
@@ -157,6 +165,19 @@ module HideMyAss
|
|
|
157
165
|
anonym? && ssl?
|
|
158
166
|
end
|
|
159
167
|
|
|
168
|
+
# :nocov:
|
|
169
|
+
# Custom inspect method.
|
|
170
|
+
#
|
|
171
|
+
# @example
|
|
172
|
+
# inspect
|
|
173
|
+
# => '<HideMyAss::Proxy http://123.57.52.171:80>'
|
|
174
|
+
#
|
|
175
|
+
# @return [ String ]
|
|
176
|
+
def inspect
|
|
177
|
+
"<#{self.class.name} #{url}>"
|
|
178
|
+
end
|
|
179
|
+
# :nocov:
|
|
180
|
+
|
|
160
181
|
private
|
|
161
182
|
|
|
162
183
|
# To find out if the element is a part of the IP.
|
data/lib/hidemyass/version.rb
CHANGED