Skip to content

Commit

Permalink
remove WebRTC code (see issue #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike10004 committed Sep 26, 2019
1 parent 7bdbbbb commit 13e7c23
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 303 deletions.
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ notifications:
before_install: dpkg-query -l google-chrome-stable || true
install: dpkg-query -l xvfb chromium-browser firefox
before_script: which firefox && firefox --version
script: mvn --batch-mode $MAVEN_OPTIONS install -Dantiprint.chrome.extraArgs=--no-sandbox -Dwdm.gitHubTokenName=$GITHUB_TOKEN_NAME -Dwdm.gitHubTokenSecret=$GITHUB_TOKEN_SECRET -Dwebdriver.firefox.bin=/usr/bin/firefox -Dwdm.chromeDriverVersion=$CHROMEDRIVER_VERSION -Dwdm.geckoDriverVersion=$GECKODRIVER_VERSION
script: >-
mvn --batch-mode $MAVEN_OPTIONS
-Dantiprint.chrome.extraArgs=--no-sandbox
-Dwdm.gitHubTokenName=$GITHUB_TOKEN_NAME
-Dwdm.gitHubTokenSecret=$GITHUB_TOKEN_SECRET
-Dwebdriver.firefox.bin=/usr/bin/firefox
-Dwdm.chromeDriverVersion=$CHROMEDRIVER_VERSION
-Dwdm.geckoDriverVersion=$GECKODRIVER_VERSION
install
14 changes: 12 additions & 2 deletions antiprint-e2e-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@
<parent>
<artifactId>antiprint</artifactId>
<groupId>com.github.mike10004</groupId>
<version>0.14</version>
<version>0.15-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>antiprint-e2e-tests</artifactId>

<properties>
<chrome.extraArgs></chrome.extraArgs>
<antiprint.tests.showBrowserWindow>false</antiprint.tests.showBrowserWindow>
<antiprint-extension.version>${project.version}</antiprint-extension.version>
<extensible-firefox-driver.version>${selenium.version}x${project.version}</extensible-firefox-driver.version>
<!--suppress CheckTagEmptyBody -->
<chrome.extraArgs></chrome.extraArgs>
</properties>

<profiles>
<profile>
<id>show-browser-window</id>
<properties>
<antiprint.tests.showBrowserWindow>true</antiprint.tests.showBrowserWindow>
</properties>
</profile>
<profile>
<id>allow-outdated-crx</id>
<build>
Expand Down Expand Up @@ -50,6 +58,8 @@
<antiprint.chrome.executablePath>${chrome.executablePath}</antiprint.chrome.executablePath>
<antiprint.chrome.extraArgs>${chrome.extraArgs}</antiprint.chrome.extraArgs>
<antiprint.e2e.tests.allowOutdatedCrxFile>false</antiprint.e2e.tests.allowOutdatedCrxFile>
<antiprint.tests.showBrowserWindow>${antiprint.tests.showBrowserWindow}</antiprint.tests.showBrowserWindow>
<wdm.chromeDriverVersion>76.0.3809.68</wdm.chromeDriverVersion>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public abstract class BrowserUsingTestBase<W extends WebDriver, P> {

protected static final boolean SHOW_BROWSER_WINDOW = false;
protected static final boolean SHOW_BROWSER_WINDOW = Boolean.parseBoolean(System.getProperty("antiprint.tests.showBrowserWindow"));
protected static final boolean PAUSE_BEFORE_CLOSE = false;
protected static final int TIMEOUT_SECONDS = Tests.getGlobalBrowserTestTimeout();

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.google.gson.JsonPrimitive;
import io.github.bonigarcia.wdm.ChromeDriverManager;
import io.github.bonigarcia.wdm.FirefoxDriverManager;
import io.github.bonigarcia.wdm.WebDriverManager;
import net.sf.uadetector.OperatingSystemFamily;
import net.sf.uadetector.UserAgentFamily;
import org.apache.commons.io.FileUtils;
Expand Down Expand Up @@ -103,7 +104,7 @@ public static BrowserFingerprintTestCase getNavigatorTestCase(UserAgentFamily us

public static ImmutableList<BrowserFingerprintTestCase> getNavigatorTestCases() {
try (Reader reader = Resources.asCharSource(Tests.class.getResource("/navigator-test-cases.json"), UTF_8).openStream()) {
BrowserFingerprintTestCase testCases[] = new Gson().fromJson(reader, BrowserFingerprintTestCase[].class);
BrowserFingerprintTestCase[] testCases = new Gson().fromJson(reader, BrowserFingerprintTestCase[].class);
checkState(testCases != null);
return ImmutableList.copyOf(testCases);
} catch (IOException e) {
Expand All @@ -116,11 +117,11 @@ public static File getBuildDir() {
}

public static void setUpGeckodriver() {
FirefoxDriverManager.getInstance().setup();
WebDriverManager.firefoxdriver().setup();
}

public static void setUpChromedriver() {
ChromeDriverManager.getInstance().setup();
WebDriverManager.chromedriver().setup();
}

public static boolean filesEqual(Unzippage a, Unzippage b) throws IOException {
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion antiprint-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>antiprint</artifactId>
<groupId>com.github.mike10004</groupId>
<version>0.14</version>
<version>0.15-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
41 changes: 0 additions & 41 deletions antiprint-extension/src/main/extension/browser-settings.html

This file was deleted.

9 changes: 0 additions & 9 deletions antiprint-extension/src/main/extension/browser-settings.js

This file was deleted.

9 changes: 1 addition & 8 deletions antiprint-extension/src/main/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Antiprint",
"description": "Protect your browser from fingerprinting.",
"version": "0.14",
"version": "0.15",
"icons": {
"16": "icons/icon-16.png",
"48": "icons/icon-48.png",
Expand All @@ -19,16 +19,9 @@
"js": ["lib/ua-parser.js", "projection.js", "injector.js"],
"run_at": "document_start"
}],
"background": {
"scripts": ["webrtc-policy.js"],
"persistent": false
},
"permissions": [
"privacy"
],
"web_accessible_resources": [
"browser-settings.html"
],
"applications": {
"gecko": {
"id": "[email protected]",
Expand Down
5 changes: 1 addition & 4 deletions antiprint-extension/src/main/extension/popup.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Antiprint</title>
Expand All @@ -24,9 +24,6 @@
<h1>Antiprint Protection Measures</h1>
<ul>
<li>&#x2714; Navigator projection</li>
<li>&#x2714; WebRTC address leak prevention</li>
</ul>
<a href="#" id="settings-link">View settings</a>
<script src="popup.js"></script>
</body>
</html>
9 changes: 0 additions & 9 deletions antiprint-extension/src/main/extension/popup.js

This file was deleted.

Loading

0 comments on commit 13e7c23

Please sign in to comment.