selenium_tor 1.6.0 → 2.0.0
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/.rubocop.yml +6 -5
- data/CHANGELOG.md +26 -0
- data/README.md +34 -41
- data/Rakefile +1 -2
- data/fonts/Arimo-Bold.ttf +0 -0
- data/fonts/Arimo-BoldItalic.ttf +0 -0
- data/fonts/Arimo-Italic.ttf +0 -0
- data/fonts/Arimo-Regular.ttf +0 -0
- data/fonts/Cousine-Bold.ttf +0 -0
- data/fonts/Cousine-BoldItalic.ttf +0 -0
- data/fonts/Cousine-Italic.ttf +0 -0
- data/fonts/Cousine-Regular.ttf +0 -0
- data/fonts/NotoNaskhArabic-Regular.ttf +0 -0
- data/fonts/NotoSansAdlam-Regular.ttf +0 -0
- data/fonts/NotoSansArmenian-Regular.ttf +0 -0
- data/fonts/NotoSansBalinese-Regular.ttf +0 -0
- data/fonts/NotoSansBamum-Regular.ttf +0 -0
- data/fonts/NotoSansBassaVah-Regular.ttf +0 -0
- data/fonts/NotoSansBatak-Regular.ttf +0 -0
- data/fonts/NotoSansBengali-Regular.ttf +0 -0
- data/fonts/NotoSansBuginese-Regular.ttf +0 -0
- data/fonts/NotoSansBuhid-Regular.ttf +0 -0
- data/fonts/NotoSansCanadianAboriginal-Regular.ttf +0 -0
- data/fonts/NotoSansChakma-Regular.ttf +0 -0
- data/fonts/NotoSansCham-Regular.ttf +0 -0
- data/fonts/NotoSansCherokee-Regular.ttf +0 -0
- data/fonts/NotoSansCoptic-Regular.ttf +0 -0
- data/fonts/NotoSansDeseret-Regular.ttf +0 -0
- data/fonts/NotoSansDevanagari-Regular.ttf +0 -0
- data/fonts/NotoSansElbasan-Regular.ttf +0 -0
- data/fonts/NotoSansEthiopic-Regular.ttf +0 -0
- data/fonts/NotoSansGeorgian-Regular.ttf +0 -0
- data/fonts/NotoSansGrantha-Regular.ttf +0 -0
- data/fonts/NotoSansGujarati-Regular.ttf +0 -0
- data/fonts/NotoSansGunjalaGondi-Regular.ttf +0 -0
- data/fonts/NotoSansGurmukhi-Regular.ttf +0 -0
- data/fonts/NotoSansHanifiRohingya-Regular.ttf +0 -0
- data/fonts/NotoSansHanunoo-Regular.ttf +0 -0
- data/fonts/NotoSansHebrew-Regular.ttf +0 -0
- data/fonts/NotoSansJP-Regular.otf +0 -0
- data/fonts/NotoSansJavanese-Regular.ttf +0 -0
- data/fonts/NotoSansKR-Regular.otf +0 -0
- data/fonts/NotoSansKannada-Regular.ttf +0 -0
- data/fonts/NotoSansKayahLi-Regular.ttf +0 -0
- data/fonts/NotoSansKhmer-Regular.ttf +0 -0
- data/fonts/NotoSansKhojki-Regular.ttf +0 -0
- data/fonts/NotoSansKhudawadi-Regular.ttf +0 -0
- data/fonts/NotoSansLao-Regular.ttf +0 -0
- data/fonts/NotoSansLepcha-Regular.ttf +0 -0
- data/fonts/NotoSansLimbu-Regular.ttf +0 -0
- data/fonts/NotoSansLisu-Regular.ttf +0 -0
- data/fonts/NotoSansMahajani-Regular.ttf +0 -0
- data/fonts/NotoSansMalayalam-Regular.ttf +0 -0
- data/fonts/NotoSansMandaic-Regular.ttf +0 -0
- data/fonts/NotoSansMasaramGondi-Regular.ttf +0 -0
- data/fonts/NotoSansMedefaidrin-Regular.ttf +0 -0
- data/fonts/NotoSansMeeteiMayek-Regular.ttf +0 -0
- data/fonts/NotoSansMendeKikakui-Regular.ttf +0 -0
- data/fonts/NotoSansMiao-Regular.ttf +0 -0
- data/fonts/NotoSansModi-Regular.ttf +0 -0
- data/fonts/NotoSansMongolian-Regular.ttf +0 -0
- data/fonts/NotoSansMro-Regular.ttf +0 -0
- data/fonts/NotoSansMultani-Regular.ttf +0 -0
- data/fonts/NotoSansNKo-Regular.ttf +0 -0
- data/fonts/NotoSansNewTaiLue-Regular.ttf +0 -0
- data/fonts/NotoSansNewa-Regular.ttf +0 -0
- data/fonts/NotoSansOlChiki-Regular.ttf +0 -0
- data/fonts/NotoSansOriya-Regular.ttf +0 -0
- data/fonts/NotoSansOsage-Regular.ttf +0 -0
- data/fonts/NotoSansOsmanya-Regular.ttf +0 -0
- data/fonts/NotoSansPahawhHmong-Regular.ttf +0 -0
- data/fonts/NotoSansPauCinHau-Regular.ttf +0 -0
- data/fonts/NotoSansRejang-Regular.ttf +0 -0
- data/fonts/NotoSansRunic-Regular.ttf +0 -0
- data/fonts/NotoSansSC-Regular.otf +0 -0
- data/fonts/NotoSansSamaritan-Regular.ttf +0 -0
- data/fonts/NotoSansSaurashtra-Regular.ttf +0 -0
- data/fonts/NotoSansSharada-Regular.ttf +0 -0
- data/fonts/NotoSansShavian-Regular.ttf +0 -0
- data/fonts/NotoSansSinhala-Regular.ttf +0 -0
- data/fonts/NotoSansSoraSompeng-Regular.ttf +0 -0
- data/fonts/NotoSansSoyombo-Regular.ttf +0 -0
- data/fonts/NotoSansSundanese-Regular.ttf +0 -0
- data/fonts/NotoSansSylotiNagri-Regular.ttf +0 -0
- data/fonts/NotoSansSymbols-Regular.ttf +0 -0
- data/fonts/NotoSansSymbols2-Regular.ttf +0 -0
- data/fonts/NotoSansSyriac-Regular.ttf +0 -0
- data/fonts/NotoSansTC-Regular.otf +0 -0
- data/fonts/NotoSansTagalog-Regular.ttf +0 -0
- data/fonts/NotoSansTagbanwa-Regular.ttf +0 -0
- data/fonts/NotoSansTaiLe-Regular.ttf +0 -0
- data/fonts/NotoSansTaiTham-Regular.ttf +0 -0
- data/fonts/NotoSansTaiViet-Regular.ttf +0 -0
- data/fonts/NotoSansTakri-Regular.ttf +0 -0
- data/fonts/NotoSansTamil-Regular.ttf +0 -0
- data/fonts/NotoSansTelugu-Regular.ttf +0 -0
- data/fonts/NotoSansThaana-Regular.ttf +0 -0
- data/fonts/NotoSansThai-Regular.ttf +0 -0
- data/fonts/NotoSansTifinagh-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghAPT-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghAdrar-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghAgrawImazighen-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghAhaggar-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghAir-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghAzawagh-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghGhat-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghHawad-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghRhissaIxa-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghSIL-Regular.ttf +0 -0
- data/fonts/NotoSansTifinaghTawellemmet-Regular.ttf +0 -0
- data/fonts/NotoSansTirhuta-Regular.ttf +0 -0
- data/fonts/NotoSansVai-Regular.ttf +0 -0
- data/fonts/NotoSansWancho-Regular.ttf +0 -0
- data/fonts/NotoSansWarangCiti-Regular.ttf +0 -0
- data/fonts/NotoSansYi-Regular.ttf +0 -0
- data/fonts/NotoSansZanabazarSquare-Regular.ttf +0 -0
- data/fonts/NotoSerifArmenian-Regular.ttf +0 -0
- data/fonts/NotoSerifBalinese-Regular.ttf +0 -0
- data/fonts/NotoSerifBengali-Regular.ttf +0 -0
- data/fonts/NotoSerifDevanagari-Regular.ttf +0 -0
- data/fonts/NotoSerifDogra-Regular.ttf +0 -0
- data/fonts/NotoSerifEthiopic-Regular.ttf +0 -0
- data/fonts/NotoSerifGeorgian-Regular.ttf +0 -0
- data/fonts/NotoSerifGrantha-Regular.ttf +0 -0
- data/fonts/NotoSerifGujarati-Regular.ttf +0 -0
- data/fonts/NotoSerifGurmukhi-Regular.ttf +0 -0
- data/fonts/NotoSerifHebrew-Regular.ttf +0 -0
- data/fonts/NotoSerifKannada-Regular.ttf +0 -0
- data/fonts/NotoSerifKhmer-Regular.ttf +0 -0
- data/fonts/NotoSerifKhojki-Regular.ttf +0 -0
- data/fonts/NotoSerifLao-Regular.ttf +0 -0
- data/fonts/NotoSerifMalayalam-Regular.ttf +0 -0
- data/fonts/NotoSerifMyanmar-Regular.ttf +0 -0
- data/fonts/NotoSerifNPHmong-Regular.ttf +0 -0
- data/fonts/NotoSerifSinhala-Regular.ttf +0 -0
- data/fonts/NotoSerifTamil-Regular.ttf +0 -0
- data/fonts/NotoSerifTelugu-Regular.ttf +0 -0
- data/fonts/NotoSerifThai-Regular.ttf +0 -0
- data/fonts/NotoSerifTibetan-Regular.ttf +0 -0
- data/fonts/NotoSerifYezidi-Regular.ttf +0 -0
- data/fonts/Pyidaungsu-2.5.3_Regular.ttf +0 -0
- data/fonts/STIXTwoMath-Regular.otf +0 -0
- data/fonts/Tinos-Bold.ttf +0 -0
- data/fonts/Tinos-BoldItalic.ttf +0 -0
- data/fonts/Tinos-Italic.ttf +0 -0
- data/fonts/Tinos-Regular.ttf +0 -0
- data/fonts/TwemojiMozilla.ttf +0 -0
- data/fonts/fonts.conf +183 -0
- data/lib/selenium_tor.rb +5 -1
- data/lib/tor/driver.rb +26 -12
- data/lib/tor/error.rb +18 -0
- data/lib/tor/libxul_checksums.yml +56 -0
- data/lib/tor/libxul_patchable.rb +13 -13
- data/lib/tor/options.rb +13 -29
- data/lib/tor/tor_prefs.rb +2 -2
- data/lib/tor/tor_process.rb +42 -13
- data/lib/tor/torrc.rb +14 -9
- data/lib/tor/version.rb +1 -1
- metadata +150 -6
- data/lib/tor/system_tor.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d91caf67c6dbe8d0ee5a4e9e1fde84901ec736d0280dc5913b91e9d38e78bc55
|
4
|
+
data.tar.gz: e3e789ac86f09532c03472f52dd80c750695d71f1b7bd4b9b4521880d5f83751
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc39fe85b2f2cceddc76d77c4e5cbbfcc35f658a0af9376affd99d397617523705e4b5a2cf11a74785ff7bfb41bf83cfbd15b87e5472649191b4d346b75f6b64
|
7
|
+
data.tar.gz: 2b0aa0060db12d4f6854b47b47979e9f50b7a013a8ad550a8fdb5268c1d9c8eda76df88090a81e620845cb1e114db6e8e1430cbdd983a0d0c5a0ef7f88758360
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
|
-
|
2
|
+
plugins:
|
3
3
|
- rubocop-minitest
|
4
4
|
- rubocop-performance
|
5
5
|
- rubocop-rake
|
@@ -7,14 +7,12 @@ require:
|
|
7
7
|
AllCops:
|
8
8
|
TargetRubyVersion: 3.2
|
9
9
|
NewCops: enable
|
10
|
+
Exclude:
|
11
|
+
- 'vendor/**/*' # GitLab caching..
|
10
12
|
|
11
13
|
Style/HashSyntax:
|
12
14
|
Enabled: false # yuk Ruby 3.1
|
13
15
|
|
14
|
-
Naming/MethodName:
|
15
|
-
Exclude:
|
16
|
-
- !ruby/regexp /test_.*\.rb$/ # for test_FOO constant tests
|
17
|
-
|
18
16
|
Security/Eval:
|
19
17
|
Exclude:
|
20
18
|
- 'test/test_readme.rb'
|
@@ -36,3 +34,6 @@ Minitest/TestMethodName:
|
|
36
34
|
|
37
35
|
Minitest/AssertTruthy:
|
38
36
|
Enabled: false
|
37
|
+
|
38
|
+
Minitest/RefuteFalse:
|
39
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
## master (unreleased)
|
2
2
|
|
3
|
+
## [2.0.0] - 2025-05-31
|
4
|
+
|
5
|
+
### New features
|
6
|
+
|
7
|
+
* SocksPort is now auto selected, 'SocksPort'/:socks_port keys are ignored in Tor::Options :tor_opts hash
|
8
|
+
* selenium-manager is disabled (avoids chance of FF being downloaded & used)
|
9
|
+
* errors in Tor namespace now subclass Selenium::WebDriver::Error::WebDriverError
|
10
|
+
* drop Xvfb/headless gem dependency
|
11
|
+
* drop deprecated :system_tor options
|
12
|
+
|
13
|
+
### Bug fixes
|
14
|
+
|
15
|
+
* ControlPort no longer set by default in torrc (security)
|
16
|
+
|
17
|
+
## [1.7.0] - 2025-05-21
|
18
|
+
|
19
|
+
### New features
|
20
|
+
|
21
|
+
* Reuse cached data files in TorProcess to speed up connection times
|
22
|
+
* drop support for TB < 14.5 stable
|
23
|
+
* add VirtualGL test to Rake tests
|
24
|
+
|
25
|
+
### Bug fixes
|
26
|
+
|
27
|
+
* [#20](https://gitlab.com/matzfan/selenium-tor/-/issues/20)
|
28
|
+
|
3
29
|
## [1.6.0] - 2024-12-04
|
4
30
|
|
5
31
|
* drop support for TB < 14.0 stable
|
data/README.md
CHANGED
@@ -8,7 +8,8 @@ A Selenium extension for Tor Browser.
|
|
8
8
|
# before_all
|
9
9
|
require 'selenium_tor'
|
10
10
|
|
11
|
-
options = Selenium::WebDriver::
|
11
|
+
options = Selenium::WebDriver::Options.tor
|
12
|
+
options.args << '-headless'
|
12
13
|
@driver = Selenium::WebDriver.for :tor, options: options
|
13
14
|
```
|
14
15
|
When you are done don't forget to quit the driver. Failure to do so may leave orphaned tor processes.
|
@@ -18,6 +19,9 @@ When you are done don't forget to quit the driver. Failure to do so may leave or
|
|
18
19
|
```
|
19
20
|
Once you have a driver instance:
|
20
21
|
```ruby
|
22
|
+
@driver
|
23
|
+
# => instance_of Selenium::WebDriver::Tor::Driver
|
24
|
+
|
21
25
|
@driver.get 'https://check.torproject.org'
|
22
26
|
@driver.title
|
23
27
|
# => "Congratulations. This browser is configured to use Tor."
|
@@ -27,7 +31,7 @@ Once you have a driver instance:
|
|
27
31
|
|
28
32
|
I can use Firefox with Selenium and set a SOCKS proxy to use the Tor network, so why the need?
|
29
33
|
|
30
|
-
The above approach will hide your IP, but there is a good chance your browser's unique or near-unique fingerprint may be logged by site owners. Subsequent visits could identify you. A primary aim of this project is to enable Selenium to leverage Tor Browser's unique anonymity characteristics - in particular its resistance to browser fingerprinting. The aim is to ensure Selenium Tor site visits leave an identical fingerprint to the thousands of regular Tor Browser users.
|
34
|
+
The above approach will hide your IP, but there is a good chance your browser's unique or near-unique fingerprint may be logged by site owners. Subsequent visits could identify you. A primary aim of this project is to enable Selenium to leverage Tor Browser's unique anonymity characteristics - in particular its resistance to browser fingerprinting. The primary aim is to ensure Selenium Tor site visits leave an identical fingerprint to the thousands of regular Tor Browser users.
|
31
35
|
|
32
36
|
## Installation
|
33
37
|
|
@@ -41,13 +45,13 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
41
45
|
|
42
46
|
## Dependencies and configuration
|
43
47
|
|
44
|
-
[Tor Browser](https://www.torproject.org/download).
|
48
|
+
[Tor Browser](https://www.torproject.org/download). Tests are conducted with the latest stable ('release') and alpha versions of Tor Browser. Support for older versions is periodically dropped - see the CHANGELOG.
|
45
49
|
|
46
|
-
As with Firefox browser, `geckodriver` needs to be installed and in your PATH.
|
50
|
+
As with Firefox browser, `geckodriver` needs to be installed and in your PATH. [Selenium Manager](https://www.selenium.dev/documentation/selenium_manager) is disabled for security reasons, so you are responsible for ensuring the correct (latest) version of geckodriver is installed.
|
47
51
|
|
48
52
|
The gem needs to know the location of the Tor Browser Bundle (TBB). The Tor Browser download package archive must be extracted and the root TBB directory (named "tor-browser") placed somewhere on your system. By default it is assumed to be in the current user's HOME directory. An alternative location can be set via the env var `TOR_BROWSER_ROOT_DIR` - e.g. `export TOR_BROWSER_ROOT_DIR=/home/<user>/Downloads`. The Tor Browser binary location is *automatically set* by reference to this directory, so there is no need to do this:
|
49
53
|
```ruby
|
50
|
-
options = Selenium::WebDriver::
|
54
|
+
options = Selenium::WebDriver::Options.tor
|
51
55
|
options.binary = '/some/path/to/tor_firefox_binary' # UNNECESSARY
|
52
56
|
# => '/some/path/to/tor_firefox_binary'
|
53
57
|
```
|
@@ -56,21 +60,6 @@ The location of the TBB is not expected to change during code execution.
|
|
56
60
|
|
57
61
|
Tor Selenium is tested on **Linux only** right now.
|
58
62
|
|
59
|
-
### Patching libxul.so
|
60
|
-
|
61
|
-
A configuration option to patch the libxul.so packaged with Tor Browser is provided. This has the effect of preventing websites from fingerprinting Selenium-driven Tor Browser via a JS call to `navigator.webdriver`:
|
62
|
-
```ruby
|
63
|
-
@driver_class = Selenium::WebDriver::Tor::Driver
|
64
|
-
@driver_class.libxul_patched? # is Tor Browser's libxul.so patched?
|
65
|
-
# => false
|
66
|
-
@driver_class.patch_libxul # patch libxul.so
|
67
|
-
@driver_class.libxul_patched?
|
68
|
-
# => true
|
69
|
-
@driver_class.unpatch_libxul # revert the patch and restore the libxul.so packaged with Tor Browser
|
70
|
-
# => 0
|
71
|
-
```
|
72
|
-
The patcher uses the [Bsdiff](https://gitlab.com/matzfan/bsdiff) gem, which in turn requires the bzip2 library (`libbz2-dev`).
|
73
|
-
|
74
63
|
## Usage
|
75
64
|
```ruby
|
76
65
|
require 'selenium_tor'
|
@@ -84,21 +73,17 @@ A separate tor process is used for each driver. Failure to call `Driver#quit` af
|
|
84
73
|
|
85
74
|
### Tor options
|
86
75
|
|
87
|
-
In addition to the regular Firefox options, a
|
76
|
+
In addition to the regular Firefox options, a `:tor_opts` key may be passed to an instance of `Tor::Options` with a hash of tor options. All valid tor client options are recognized - see `man tor`. Snake case key symbols may be used if these can be coerced to valid camel case key strings - e.g. `:control_port` becomes 'ControlPort'. Additionally, a `:tor_opts` timeout value may be set with the `:timeout` key. This overrides the default time allowed for the tor process to bootstrap (10 seconds).
|
88
77
|
|
89
78
|
### Multiple driver instances
|
90
79
|
|
91
|
-
Running multiple tor processes requires that each uses different ports for SocksPort (and ControlPort, if used).
|
80
|
+
Running multiple tor processes requires that each uses different ports for SocksPort (and ControlPort, if used). From version 2.0 the SocksPort is auto selected, so no configuation is required. An example using the [Parallel gem](https://rubygems.org/gems/parallel):
|
92
81
|
```ruby
|
93
82
|
require 'parallel'
|
94
83
|
|
95
|
-
@socks_port = 9150
|
96
|
-
@control_port = 9151
|
97
|
-
|
98
84
|
def driver
|
99
|
-
|
100
|
-
|
101
|
-
options = Selenium::WebDriver::Tor::Options.new tor_opts: { socks_port: @socks_port, control_port: @control_port }
|
85
|
+
options = Selenium::WebDriver::Options.tor # no needs to pass SocksPort in :tor_opts from version 2.0
|
86
|
+
options.args << '-headless'
|
102
87
|
Selenium::WebDriver.for :tor, options: options
|
103
88
|
end
|
104
89
|
|
@@ -111,6 +96,8 @@ end
|
|
111
96
|
@drivers.each(&:quit)
|
112
97
|
# => truthy
|
113
98
|
```
|
99
|
+
Each Driver instance uses a separate data directory for `torrc` and other files. Starting from version 1.7 cached files created upon first connection to the tor network are copied into subsequent data dirs. This substantially reduces the time subsequent Drivers take to connect to the tor network.
|
100
|
+
|
114
101
|
### Tor Browser specific functionality
|
115
102
|
|
116
103
|
You can get and set the security level (shield icon in TB) as follows. 4 is 'Standard', 2 is 'Safer', 1 is 'Safest'.
|
@@ -153,31 +140,37 @@ Tor::TBB_EXTENSIONS_DIR # path to the 'extensions' directory in the above
|
|
153
140
|
Tor::TBB_VERSION # the version installed, e.g. "13.0.1", note: driver.capabilities.browser_version returns the Firefox version Tor Browser is based on
|
154
141
|
# => instance_of String
|
155
142
|
```
|
143
|
+
### Patching libxul.so
|
156
144
|
|
157
|
-
|
145
|
+
A configuration option to patch the `libxul.so` packaged with Tor Browser is provided. This has the effect of preventing websites from fingerprinting Selenium-driven Tor Browser via a JS call to `navigator.webdriver`:
|
146
|
+
```ruby
|
147
|
+
@driver_class = Selenium::WebDriver::Tor::Driver
|
148
|
+
@driver_class.libxul_patched? # is Tor Browser's libxul.so patched?
|
149
|
+
# => false
|
150
|
+
@driver_class.patch_libxul # patch libxul.so
|
151
|
+
@driver_class.libxul_patched?
|
152
|
+
# => true
|
153
|
+
@driver_class.unpatch_libxul # revert the patch and restore the libxul.so packaged with Tor Browser
|
154
|
+
# => 0
|
155
|
+
```
|
156
|
+
The patcher uses the [Bsdiff](https://gitlab.com/matzfan/bsdiff) gem.
|
158
157
|
|
159
|
-
|
158
|
+
### Exceptions
|
160
159
|
|
161
|
-
|
160
|
+
Tor-specific webdriver funcionality raises `Tor::Error` or a subclass. `Tor::Error` itself subclasses `WebDriver::Error::WebDriverError`
|
162
161
|
|
163
|
-
|
162
|
+
## Known issues
|
163
|
+
|
164
|
+
Known issues are recorded [here](https://gitlab.com/matzfan/selenium-tor/-/issues).
|
164
165
|
|
165
166
|
## Testing
|
166
167
|
|
167
168
|
~~After checking out the repo, run `bin/setup` to install dependencies.~~
|
168
169
|
|
169
|
-
|
170
|
-
|
171
|
-
Tests are run in the display set by the `DISPLAY` env var, usually :0 by default. To run headless tests, set it to another value:
|
172
|
-
|
173
|
-
$ DISPLAY=:99 bundle exec rake
|
170
|
+
$ bundle exec rake
|
174
171
|
|
175
172
|
If you find driver instantiation failing with port bind failure error messages ( these include "Address already in use. Is Tor already running?") check you have no other tor processes running with conflicting ports. With timeout errors, you may also want to check the Tor network is actually up, it isn't always..
|
176
173
|
|
177
|
-
If you wish run the `vglrun` WebGL fingerprint test install VirtualGL (see above, assumes you have the relevent drivers installed) and run the following command:
|
178
|
-
|
179
|
-
$ DISPLAY=:99 vglrun bundle exec ruby test/features/fingerprinting/vglrun_test_fingerprintjs.rb
|
180
|
-
|
181
174
|
## Development
|
182
175
|
|
183
176
|
You can run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
require 'rake/testtask'
|
5
|
+
require 'rubocop/rake_task'
|
5
6
|
|
6
7
|
Rake::TestTask.new(:test) do |t|
|
7
8
|
t.libs << 'test'
|
@@ -10,8 +11,6 @@ Rake::TestTask.new(:test) do |t|
|
|
10
11
|
# t.warning = false
|
11
12
|
end
|
12
13
|
|
13
|
-
require 'rubocop/rake_task'
|
14
|
-
|
15
14
|
RuboCop::RakeTask.new
|
16
15
|
|
17
16
|
task default: %i[test rubocop]
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|