Compare commits

..

1 Commits

Author SHA1 Message Date
eyedeekay
c5983d3f9f WIP 2024-04-08 18:12:51 -04:00
19 changed files with 231 additions and 329 deletions

View File

@@ -24,7 +24,7 @@ jobs:
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
- name: install crx3
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-linux; chmod +x $(go env GOPATH)/bin/crx3
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
@@ -115,7 +115,7 @@ jobs:
echo "build.built-by=GitHub Actions" >> override.properties
echo "noExe=true" >> override.properties
- name: install crx3
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-linux; chmod +x $(go env GOPATH)/bin/crx3
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
@@ -211,7 +211,7 @@ jobs:
bash -c 'echo "build.built-by=GitHub Actions" >> override.properties'
bash -c 'echo "noExe=true" >> override.properties'
- name: install crx3
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-osx; chmod +x $(go env GOPATH)/bin/crx3
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version

View File

@@ -1,16 +1,3 @@
Sat, October 19
---------------
- Ignore most changes when running in Tor Browser, only set the proxy
- 2.7.0 release
Mon, July 8
-----------
- Fix a bug which caused the profile manager to fail to detect Firefox on some systems
- Fix a bug which caused the profile manager to use an unwritable directory on some systems
- Fix a bug where if user tried to run it from the home directory, the application would make sure that no firefoxes existed in any subdirectory before running
Thu, March 7
------------

View File

@@ -6,23 +6,23 @@ Extension Versions
```md
i2p-in-private-browsing
2.7.0
https://addons.mozilla.org/firefox/downloads/file/4364373/i2p_in_private_browsing-2.7.0.xpi
1.48
https://addons.mozilla.org/firefox/downloads/file/4123613/i2p_in_private_browsing-1.48.xpi
noscript
11.4.42
https://addons.mozilla.org/firefox/downloads/file/4363712/noscript-11.4.42.xpi
11.4.29
https://addons.mozilla.org/firefox/downloads/file/4206186/noscript-11.4.29.xpi
localcdn-fork-of-decentraleyes
2.6.74
https://addons.mozilla.org/firefox/downloads/file/4364493/localcdn_fork_of_decentraleyes-2.6.74.xpi
2.6.65
https://addons.mozilla.org/firefox/downloads/file/4251866/localcdn_fork_of_decentraleyes-2.6.65.xpi
onion-in-container-browsing
0.82
https://addons.mozilla.org/firefox/downloads/file/3904685/onion_in_container_browsing-0.82.xpi
javascript-restrictor
0.19.1
https://addons.mozilla.org/firefox/downloads/file/4352350/javascript_restrictor-0.19.1.xpi
0.17
https://addons.mozilla.org/firefox/downloads/file/4190089/javascript_restrictor-0.17.xpi
ublock-origin
1.60.0
https://addons.mozilla.org/firefox/downloads/file/4359936/ublock_origin-1.60.0.xpi
1.57.0
https://addons.mozilla.org/firefox/downloads/file/4257361/ublock_origin-1.57.0.xpi
```
## Chromium
@@ -32,15 +32,15 @@ __MSG_extensionName__
1.29
https://clients2.google.com/service/update2/crx
NoScript
11.4.42
11.4.18
https://clients2.google.com/service/update2/crx
LocalCDN
2.6.73
2.6.65
https://clients2.google.com/service/update2/crx
uBlock Origin
1.60.0
1.57.0
https://clients2.google.com/service/update2/crx
__MSG_extensionName__
0.19.1
0.17
https://clients2.google.com/service/update2/crx
```

View File

@@ -328,7 +328,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<target name="buildNum">
<buildnumber file="scripts/build.number" />
<property name="release.number" value="1.4.991" />
<property name="release.number" value="1.5.0" />
<exec executable="echo" osfamily="unix">
<arg value="${release.number}-${build.number}" />
</exec>
@@ -522,7 +522,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
<exec executable="rm" failonerror="true" osfamily="windows">
<arg value="-rf" />
@@ -558,7 +557,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
@@ -576,7 +574,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
@@ -595,7 +592,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="fedora-release" depends="jar">
@@ -612,7 +608,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows" depends="jar">
@@ -633,7 +628,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-release" depends="jar">
@@ -654,7 +648,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-msi" depends="jar">
@@ -675,7 +668,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-msi-release" depends="jar">
@@ -696,7 +688,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-portable" depends="jar">
@@ -709,7 +700,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
<delete file="i2pbrowser-portable.zip"/>
@@ -729,7 +719,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
<delete file="i2pbrowser-portable.zip"/>
@@ -753,7 +742,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="macos-release" depends="jar">
@@ -769,7 +757,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="macos-pkg" depends="jar">
@@ -785,7 +772,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="macos-pkg-release" depends="jar">
@@ -801,7 +787,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>

View File

@@ -1,6 +1,6 @@
#! /usr/bin/env sh
export GITHUB_USER=eyedeekay
export GITHUB_REPO=i2p.plugins.firefox
export GITHUB_NAME="Fixes the build system"
export GITHUB_NAME="Updates extensions, plugin support temporarily removed(Stay on the old version)"
export GITHUB_DESCRIPTION=$(cat CHANGES.md VERSION.md)
export GITHUB_TAG=$(git describe --tags --abbrev=0)

View File

@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Fri Oct 18 23:29:32 EDT 2024
build.number=792
#Thu Apr 04 12:21:54 EDT 2024
build.number=722

View File

@@ -253,8 +253,6 @@ public class I2PBrowser extends I2PGenericUnsafeBrowser {
}
}
}
if (!this.chromium)
this.firefox = true;
}
return visitURL;
}

View File

@@ -26,7 +26,7 @@ import java.util.stream.Stream;
* @author idk
* @since 0.0.1
*/
public class I2PChromium extends I2PChromiumProfileBuilder {
public class I2PChromium extends I2PChromiumProfileUnpacker {
private final String[] CHROMIUM_SEARCH_PATHS = CHROMIUM_FINDER();
private Process p = null;
private String chromePath;
@@ -295,7 +295,7 @@ public class I2PChromium extends I2PChromiumProfileBuilder {
}
// now, do the same thing, but with user.dir instead of plugin
// list the directories in the user.dir directory
File userDir = userHomeDir();
File userDir = new File(System.getProperty("user.dir"));
if (userDir.exists()) {
if (isWindows()) {
File searchResult = searchFile(userDir, "ungoogled-chromium.exe");

View File

@@ -30,7 +30,8 @@ public class I2PChromiumProfileBuilder extends I2PChromiumProfileChecker {
return profileDir.getAbsolutePath();
} else {
// create the directory
if (!this.unpackProfile(profileDir.getAbsolutePath(), "chromium", mode)) {
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(profileDir.getAbsolutePath(), mode)) {
return null;
}
return profileDir.getAbsolutePath();
@@ -53,7 +54,8 @@ public class I2PChromiumProfileBuilder extends I2PChromiumProfileChecker {
if (pdf.exists() && pdf.isDirectory()) {
return pd;
} else {
if (!this.unpackProfile(pdf.getAbsolutePath(), "chromium", mode)) {
I2PChromiumProfileUnpacker unpacker = new I2PChromiumProfileUnpacker();
if (!unpacker.unpackProfile(pdf.getAbsolutePath(), mode)) {
return null;
}
}

View File

@@ -0,0 +1,42 @@
package net.i2p.i2pfirefox;
/**
* I2PChromiumProfileUnpacker.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PChromiumProfileUnpacker is a class that unpacks the Chromium profile zip
* file into the Chromium base profile directory. This is not used by the
* Chromium browser instance, it's unpacked to the disk to be copied to the
* active profile directory.
*
* @author idk
* @since 0.0.1
*/
public class I2PChromiumProfileUnpacker extends I2PChromiumProfileBuilder {
public static void main(String[] args) {
I2PChromiumProfileUnpacker pu = new I2PChromiumProfileUnpacker();
String profileDirectory = pu.profileDirectory("base");
if (profileDirectory == null) {
pu.logger.info("No profile directory found");
return;
}
}
/**
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory, String mode) {
logger.info("Unpacking base profile to " + profileDirectory);
return unpackProfile(profileDirectory, "chromium", mode);
}
}

View File

@@ -194,17 +194,15 @@ public class I2PCommonBrowser {
*
* @return the log file for the browser launcher
*/
/*
* private File logFile() {
* // validateUserDirectory();
* String userDirectory = System.getProperty("user.dir");
* File logDirectory = new File(userDirectory, "logs");
* if (!logDirectory.exists()) {
* logDirectory.mkdirs();
* }
* return new File(logDirectory, "browserlauncher.log");
* }
*/
/*private File logFile() {
// validateUserDirectory();
String userDirectory = System.getProperty("user.dir");
File logDirectory = new File(userDirectory, "logs");
if (!logDirectory.exists()) {
logDirectory.mkdirs();
}
return new File(logDirectory, "browserlauncher.log");
}*/
/**
* Get the runtime directory, creating it if create=true.
@@ -227,7 +225,7 @@ public class I2PCommonBrowser {
* Returns the runtime directory path based on the given override parameter.
*
* @param override the name of the environment variable to override the
* runtime
* runtime
* directory
* @return the runtime directory path as a string
*/
@@ -434,7 +432,7 @@ public class I2PCommonBrowser {
* copied to
* @throws IOException if an I/O error occurs during the file copy process
*/
public void copyFile(File sourceFile, File destinationFile)
private void copyFile(File sourceFile, File destinationFile)
throws IOException {
try (InputStream in = new FileInputStream(sourceFile);
OutputStream out = new FileOutputStream(destinationFile)) {
@@ -590,13 +588,6 @@ public class I2PCommonBrowser {
* @return the found file or null if not found
*/
public File searchFile(File directory, String search) {
File hd = new File(System.getProperty("user.home"));
if (hd != null) {
if (directory.getAbsolutePath().equals(hd.getAbsolutePath()))
return null;
}
if (directory == null || !directory.exists() || !directory.canRead())
return null;
if (directory.isDirectory()) {
File[] files = directory.listFiles();
for (File file : files) {
@@ -611,18 +602,4 @@ public class I2PCommonBrowser {
}
return null;
}
public File userHomeDir() {
File rd = new File(System.getProperty("user.dir"));
File hd = new File(System.getProperty("user.home"));
if (rd == null || !rd.exists()) {
if (hd == null || !hd.exists()) {
if (rd.getAbsolutePath().equals(hd.getAbsolutePath()))
return null;
}
return rd;
}
logger.info("Runtime directory discovered at: " + rd);
return rd;
}
}

View File

@@ -1,11 +1,9 @@
package net.i2p.i2pfirefox;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -29,7 +27,7 @@ import java.util.stream.Stream;
* @author idk
* @since 0.0.1
*/
public class I2PFirefox extends I2PFirefoxProfileBuilder {
public class I2PFirefox extends I2PFirefoxProfileUnpacker {
private final String[] FIREFOX_SEARCH_PATHS = FIREFOX_FINDER();
private Process process = null;
private String firefoxPath;
@@ -126,7 +124,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
}
return exePath;
}
public String[] firefoxPathsOSX() {
String firefoxPathsProp = getProperties().getProperty("firefox.paths.osx");
if (firefoxPathsProp != null)
@@ -137,7 +134,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
"/Applications/Waterfox.app/Contents/MacOS",
"/Applications/Librewolf.app/Contents/MacOS"};
}
private String[] FIND_FIREFOX_SEARCH_PATHS_OSX() {
String[] path = firefoxPathsOSX();
String[] exes = firefoxBinsUnix();
@@ -151,7 +147,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
}
return exePath;
}
public String[] firefoxPathsWindows() {
String firefoxPathsProp =
getProperties().getProperty("firefox.paths.windows");
@@ -186,7 +181,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
new File(programFiles, "Librewolf/").toString(),
};
}
private String[] firefoxBinsWindows() {
String firefoxPathsProp =
getProperties().getProperty("firefox.bins.windows");
@@ -198,7 +192,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
"waterfox.exe", "waterfox-bin.exe", "librewolf.exe",
};
}
private String[] FIND_FIREFOX_SEARCH_PATHS_WINDOWS() {
String[] path = firefoxPathsWindows();
String[] exes = firefoxBinsWindows();
@@ -233,7 +226,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
}
return exePath;
}
private String[] FIND_FIREFOX_SEARCH_PATHS() {
switch (getOperatingSystem()) {
case "Windows":
@@ -300,7 +292,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
}
// now, do the same thing, but with user.dir instead of plugin
// list the directories in the user.dir directory
File userDir = userHomeDir();
File userDir = new File(System.getProperty("user.dir"));
if (userDir.exists()) {
if (isWindows()) {
File searchResult = searchFile(userDir, "firefox-esr.exe");
@@ -345,7 +337,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
return new String[] {};
}
private String[] FIREFOX_FINDER() {
String[] nearby = NEARBY_FIREFOX_SEARCH_PATHS();
String[] all = FIND_FIREFOX_SEARCH_PATHS();
@@ -375,9 +366,8 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
if (firefoxFile.exists()) {
logger.info("Found valid firefox at " + firefox);
validFirefoxes.add(firefox);
} else {
logger.info("firefox at " + firefox + "does not exist");
}
logger.info("firefox at " + firefox + "does not exist");
}
return validFirefoxes.toArray(new String[validFirefoxes.size()]);
}
@@ -386,7 +376,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
* Return the best available Firefox from the list of Firefoxes we have.
*
* @return the path to the best available Firefox, or null if none are
* found.
* found.
* @since 0.0.1
*/
public String topFirefox() {
@@ -421,7 +411,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param override the path to a valid Firefox binary to use.
* @return the path to the best available Firefox, or null if none are
* found.
* found.
* @since 0.0.1
*/
public String topFirefox(String overrideFirefox) {
@@ -439,7 +429,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
* the default profile.
*
* @return a ProcessBuilder for the top Firefox binary and
* the default profile.
* the default profile.
* @since 0.0.1
*/
public ProcessBuilder defaultProcessBuilder() {
@@ -452,7 +442,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param args the args to pass to the Firefox binary
* @return a ProcessBuilder for the top Firefox binary and
* the default profile.
* the default profile.
*/
public ProcessBuilder defaultProcessBuilder(String[] args) {
return processBuilder(args, false);
@@ -465,7 +455,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param args the arguments to pass to the Firefox binary.
* @return a ProcessBuilder for the top Firefox binary and
* the default profile.
* the default profile.
* @since 0.0.1
*/
public ProcessBuilder privateProcessBuilder() {
@@ -479,7 +469,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param args the arguments to pass to the Firefox binary
* @return a ProcessBuilder for the top Firefox binary and
* the default profile.
* the default profile.
*/
public ProcessBuilder privateProcessBuilder(String[] args) {
ArrayList<String> argList = new ArrayList<String>();
@@ -501,7 +491,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param args the arguments to pass to the Firefox binary.
* @return a ProcessBuilder for the top Firefox binary and
* the default profile.
* the default profile.
* @since 0.0.1
*/
public ProcessBuilder appProcessBuilder() {
@@ -515,7 +505,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param args the arguments to pass to the Firefox binary
* @return a ProcessBuilder for the top Firefox binary and
* the default profile.
* the default profile.
*/
public ProcessBuilder appProcessBuilder(String[] args) {
ArrayList<String> argList = new ArrayList<String>();
@@ -536,7 +526,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param args the arguments to pass to the Firefox binary
* @return a ProcessBuilder for the top Firefox binary and
* the default profile.
* the default profile.
*/
public ProcessBuilder headlessProcessBuilder(String[] args) {
ArrayList<String> argList = new ArrayList<String>();
@@ -558,14 +548,14 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
*
* @param args the extended arguments to pass to the Firefox binary.
* @return a ProcessBuilder for the top Firefox binary and
* default profile, with a specific set of extended arguments.
* default profile, with a specific set of extended arguments.
* @since 0.0.1
*/
/*
* public ProcessBuilder processBuilder(String[] args ) {
* return processBuilder(args, false);
* }
*/
public ProcessBuilder processBuilder(String[] args ) {
return processBuilder(args, false);
}
*/
public ProcessBuilder processBuilder(String[] args, boolean app) {
String firefox = topFirefox();
if (!firefox.isEmpty()) {
@@ -693,7 +683,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
pb.environment().put("TOR_SKIP_CONTROLPORTTEST", "1");
pb.environment().put("TOR_NONTOR_PROXY", "1");
return pb;
// }
//}
// return null;
}
@@ -703,14 +693,12 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
}
return "base";
}
public Process launchAndDetatch(boolean privateWindow, String[] url) {
int privateWindowInt = 0;
if (privateWindow)
privateWindowInt = 1;
return launchAndDetatch(privateWindowInt, url);
}
public Process launchAndDetatch(int privateWindow, String[] url) {
validateUserDirectory();
boolean app = false;
@@ -718,13 +706,12 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
app = true;
if (waitForProxy()) {
String profileDirectory = this.profileDirectory(app, baseMode());
if (this.validateProfileDirectory(profileDirectory) && !isTorBrowser()) {
if (this.validateProfileDirectory(profileDirectory)) {
logger.info("Valid profile directory: " + profileDirectory);
} else {
logger.info("Invalid profile directory: " + profileDirectory +
" rebuilding...");
if (!this.copyBaseProfiletoProfile(usabilityMode(), app,
isTorBrowser())) {
if (!this.copyBaseProfiletoProfile(usabilityMode(), app)) {
logger.info("Failed to rebuild profile directory: " +
profileDirectory);
return null;
@@ -733,7 +720,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
}
}
if (validateProfileFirstRun(profileDirectory)) {
if (isWindows() && !isTorBrowser()) {
if (isWindows()) {
ProcessBuilder hpb = headlessProcessBuilder(url);
try {
Process hp = hpb.start();
@@ -799,8 +786,8 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
* Waits for an HTTP proxy on the port 4444 to be ready.
* Launches Firefox with the profile directory.
*
* @param bool if true, the profile will be ephemeral(i.e. a
* --private-window profile).
* @param bool if true, the profile will be ephemeral(i.e. a
* --private-window profile).
* @param String[] a list of URL's to pass to the browser window
* @since 0.0.17
*/
@@ -810,7 +797,6 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
priv = 1;
launch(priv, url);
}
public void launch(int privateWindow, String[] url) {
if (waitForProxy()) {
process = launchAndDetatch(privateWindow, url);
@@ -834,7 +820,7 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
* Launches Firefox with the profile directory.
*
* @param bool if true, the profile will be ephemeral(i.e. a
* --private-window profile).
* --private-window profile).
* @since 0.0.1
*/
public void launch(boolean privateWindow) { launch(privateWindow, null); }
@@ -916,40 +902,12 @@ public class I2PFirefox extends I2PFirefoxProfileBuilder {
visitURL.toArray(new String[visitURL.size()]));
}
public boolean isTorBrowser() {
String[] args = {"--version"};
ProcessBuilder tpb = defaultProcessBuilder(args);
/*private void sleep(int millis) {
try {
Process tp = tpb.start();
BufferedReader reader =
new BufferedReader(new InputStreamReader(tp.getInputStream()));
StringBuilder builder = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
builder.append(line);
builder.append(System.getProperty("line.separator"));
}
String result = builder.toString().toLowerCase();
if (result.contains("tor ")) {
logger.info("running in Tor Browser, modifying only required config");
return true;
} else {
logger.info("running in regular Firefox, using extended config");
return false;
}
} catch (Exception e) {
return false;
Thread.sleep(millis);
} catch (InterruptedException bad) {
bad.printStackTrace();
throw new RuntimeException(bad);
}
}
/*
* private void sleep(int millis) {s
* try {
* Thread.sleep(millis);
* } catch (InterruptedException bad) {
* bad.printStackTrace();
* throw new RuntimeException(bad);
* }
* }
*/
}*/
}

View File

@@ -1,7 +1,6 @@
package net.i2p.i2pfirefox;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
@@ -26,44 +25,6 @@ import java.nio.file.StandardCopyOption;
*/
public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
private boolean strict;
private String TBB_BASE =
"user_pref(\"extensions.torbutton.use_nontor_proxy\", true);\n"
+ "user_pref(\"extensions.torlauncher.start_tor\", false);\n"
+ "user_pref(\"extensions.torlauncher.prompt_at_startup\", false);\n"
+
"user_pref(\"network.proxy.no_proxies_on\", \"127.0.0.1:7657,localhost:7657,127.0.0.1:7662,localhost:7662,127.0.0.1:7669,localhost:7669\");\n"
+ "user_pref(\"network.proxy.type\", 1);\n"
+ "user_pref(\"network.proxy.http\", \"127.0.0.1\");\n"
+ "user_pref(\"network.proxy.http_port\", 4444);\n"
+ "user_pref(\"network.proxy.ssl\", \"127.0.0.1\");\n"
+ "user_pref(\"network.proxy.ssl_port\", 4444);\n"
+ "user_pref(\"network.proxy.ftp\", \"127.0.0.1\");"
+ "user_pref(\"network.proxy.ftp_port\", 4444);\n"
+ "user_pref(\"network.proxy.socks\", \"127.0.0.1\");\n"
+ "user_pref(\"network.proxy.socks_port\", 4444);\n"
+ "user_pref(\"network.proxy.share_proxy_settings\", true);\n"
+ "user_pref(\"browser.startup.homepage\", \"about:blank\");\n"
+ "user_pref(\"keyword.enabled\", false);\n"
+ "user_pref(\"extensions.allowPrivateBrowsingByDefault\", true);\n"
+ "user_pref(\"extensions.PrivateBrowsing.notification\", false);\n"
+ "user_pref(\"extensions.pocket.enabled\", false);\n"
+
"user_pref(\"browser.newtabpage.activity-stream.showSponsoredTopSites\", false);\n"
+
"user_pref(\"browser.newtabpage.activity-stream.showSponsored\", false);\n"
+
"user_pref(\"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsored\", false);\n"
+
"user_pref(\"browser.newtabpage.activity-stream.feeds.section.highlights\", false);\n"
+
"user_pref(\"browser.newtabpage.activity-stream.feeds.section.topstories\", false);\n"
+
"user_pref(\"browser.newtabpage.activity-stream.default.sites\", \"http://planet.i2p/,http://legwork.i2p/,http://i2pwiki.i2p/,http://i2pforums.i2p/,http://zzz.i2p/\");\n"
+
"user_pref(\"browser.newtabpage.activity-stream.feeds.topsites\", true);\n"
+ "user_pref(\"browser.fixup.domainsuffixwhitelist.i2p\", true);\n";
private String userChromeCSS() {
String ret =
"@namespace url(\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\")\n";
@@ -138,24 +99,19 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
* @return the profile directory, or null if it could not be created
*/
// public String profileDirectory() {
// return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", false);
// return profileDirectory("I2P_FIREFOX_PROFILE", "firefox", false);
// }
private String baseProfileDir(String file, String base,
boolean isTorBrowser) {
private String baseProfileDir(String file, String base) {
File profileDir = new File(file, "i2p.firefox." + base + ".profile");
// make sure the directory exists
if (profileDir.exists()) {
return profileDir.getAbsolutePath();
} else {
// create the directory
if (!isTorBrowser) {
if (!this.unpackProfile(profileDir.getAbsolutePath(), "firefox",
base)) {
return null;
}
} else {
makeTBBDirectory(profileDir, profileDir);
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
if (!unpacker.unpackProfile(profileDir.getAbsolutePath(), base)) {
return null;
}
return profileDir.getAbsolutePath();
}
@@ -166,20 +122,21 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
*
* @return the base profile directory, or null if it could not be created
*/
public String baseProfileDirectory(String base, boolean isTorBrowser) {
public String baseProfileDirectory(String base) {
String pd = System.getenv("I2P_FIREFOX_BASE_PROFILE");
if (pd != null && !pd.isEmpty()) {
File pdf = new File(pd);
if (pdf.exists() && pdf.isDirectory()) {
return pd;
} else {
if (!this.unpackProfile(pdf.getAbsolutePath(), "firefox", base)) {
I2PFirefoxProfileUnpacker unpacker = new I2PFirefoxProfileUnpacker();
if (!unpacker.unpackProfile(pdf.getAbsolutePath(), base)) {
return null;
}
}
}
String rtd = runtimeDirectory();
return baseProfileDir(rtd, base, isTorBrowser);
return baseProfileDir(rtd, base);
}
/**
@@ -220,10 +177,11 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
*
* @since 0.0.1
*/
public boolean copyBaseProfiletoProfile(String base, boolean app,
boolean isTorBrowser) {
String baseProfile = baseProfileDirectory(base, isTorBrowser);
public boolean copyBaseProfiletoProfile(String base, boolean app) {
String baseProfile = baseProfileDirectory(base);
String profile = profileDirectory(app, base);
logger.info("Copying base profile to profile directory: " + baseProfile +
" -> " + profile);
if (baseProfile.isEmpty() || profile.isEmpty()) {
return false;
}
@@ -232,31 +190,24 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
if (!profileDir.exists()) {
try {
if (!isTorBrowser) {
logger.info("Copying base profile to profile directory: " +
baseProfile + " -> " + profile);
copyDirectory(baseProfileDir, profileDir, "firefox", base);
} else {
logger.info("Creating base directory for use with Tor Browser");
makeTBBDirectory(baseProfileDir, profileDir);
}
logger.info("Copied base profile to profile directory");
return true;
logger.info("Copying base profile to profile directory");
copyDirectory(baseProfileDir, profileDir, "firefox", base);
} catch (Exception e) {
logger.info("Error copying base profile to profile" + e);
return false;
}
logger.info("Copied base profile to profile directory");
}
// if user.js does not exist yet, make an empty one.
// if (!touch(profileDir.toString(), "user.js")) {
// return false;
// }
//}
// if extensions does not exist yet, make an empty one.
// if (!mkExtensionsDir(profileDir.toString())){
// return false;
// }
//}
return copyStrictOptions(base, app, isTorBrowser);
return copyStrictOptions(base, app);
}
protected boolean writeAppChrome(String profile) {
@@ -272,7 +223,6 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
}
return true;
}
protected boolean deleteAppChrome(String profile) {
File dir = new File(profile, "chrome");
if (!dir.exists())
@@ -282,17 +232,15 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
f.delete();
return true;
}
/**
* Copy the strict options from the base profile to the profile
*
* @return true if successful, false otherwise
* @since 0.0.1
*/
public boolean copyStrictOptions(String base, boolean app,
boolean isTorBrowser) {
public boolean copyStrictOptions(String base, boolean app) {
logger.info("Checking strict options");
String baseProfile = baseProfileDirectory(base, isTorBrowser);
String baseProfile = baseProfileDirectory(base);
String profile = profileDirectory(app, base);
if (baseProfile.isEmpty() || profile.isEmpty()) {
logger.info("Empty paths");
@@ -301,8 +249,8 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
File baseProfileDir = new File(baseProfile);
File profileDir = new File(profile);
setupUserChrome(profileDir, app);
if (!baseProfileDir.exists()) {
logger.info("Empty base directories: " + baseProfileDir);
if (!baseProfileDir.exists() || !profileDir.exists()) {
logger.info("Empty directories");
return false;
}
File baseOverrides = new File(baseProfile, "strict-overrides.js");
@@ -369,20 +317,6 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
}
}
protected void makeTBBDirectory(File sourceDir, File destDir) {
logger.info("creating TBB directory");
if (!destDir.exists())
destDir.mkdir();
File workUserJs = new File(destDir, "user.js");
// Write the value of TBB_BASE to the file workUserJs
try (FileWriter writer = new FileWriter(workUserJs)) {
logger.info("writing TBB user.js");
writer.write(TBB_BASE);
} catch (IOException e) {
logger.info("Error writing to file: " + e.getMessage());
}
}
/**
* Construct a new Profile Builder
*
@@ -392,7 +326,6 @@ public class I2PFirefoxProfileBuilder extends I2PFirefoxProfileChecker {
/**
* Construct a new Profile Builder
*
* @param strict if true, the strict overrides will be copied to the profile
*
* @since 0.0.1

View File

@@ -0,0 +1,41 @@
package net.i2p.i2pfirefox;
/**
* I2PFirefoxProfileUnpacker.java
* Copyright (C) 2022 idk <hankhill19580@gmail.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License. See LICENSE.md for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* I2PFirefoxProfileUnpacker is a class that unpacks the I2P Firefox profile
* from a zip file embedded in the `jar` file. The zip is unpacked to a base
* directory where it is left untouched, and the base profile is copied to the
* active profile directory.
*
* @author idk
* @since 0.0.1
*/
public class I2PFirefoxProfileUnpacker extends I2PFirefoxProfileBuilder {
public static void main(String[] args) {
I2PFirefoxProfileUnpacker up = new I2PFirefoxProfileUnpacker();
String profileDirectory = up.profileDirectory(false, "base");
if (profileDirectory == null) {
up.logger.info("No profile directory found");
return;
}
}
/**
* unpack the profile directory
*
* @return true if the profile directory was successfully unpacked
* @since 0.0.1
*/
public boolean unpackProfile(String profileDirectory, String base) {
return unpackProfile(profileDirectory, "firefox", base);
}
}

View File

@@ -42,8 +42,13 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
private static final String PROP_DTG_ENABLED = "desktopgui.enabled";
private final File pluginDir;
private final File profileDir;
private MenuHandle lmhs;
private MenuHandle lmhf;
private MenuHandle SafeHandleLauncher;
private MenuHandle FlexibleHandleLauncher;
// MenuHandles for app-mode launchers
private MenuHandle ConsoleHandleLauncher;
private MenuHandle SnarkHandleLauncher;
private MenuHandle SusimailHandleLauncher;
private MenuHandle TunnelHanleLauncher;
/**
* @since 1.4.0
* @return
@@ -100,8 +105,8 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
} catch (InterruptedException ie) {
}
if (dtg != null) {
dtg.removeMenu(lmhs);
dtg.removeMenu(lmhf);
dtg.removeMenu(SafeHandleLauncher);
dtg.removeMenu(FlexibleHandleLauncher);
}
}
changeState(ClientAppState.STOPPED);
@@ -132,14 +137,14 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
}
if (dtg != null) {
_log.info("I2P Browser integrating with I2P tray manager");
lmhs =
SafeHandleLauncher =
dtg.addMenu("Launch I2P Browser (Safe Mode)", new Starter(dtg));
dtg.showMenu(lmhs);
dtg.enableMenu(lmhs);
lmhf = dtg.addMenu("Launch I2P Browser (Flexible Mode)",
dtg.showMenu(SafeHandleLauncher);
dtg.enableMenu(SafeHandleLauncher);
FlexibleHandleLauncher = dtg.addMenu("Launch I2P Browser (Flexible Mode)",
new FlexStarter(dtg));
dtg.showMenu(lmhf);
dtg.enableMenu(lmhf);
dtg.showMenu(FlexibleHandleLauncher);
dtg.enableMenu(FlexibleHandleLauncher);
} else {
_log.info("I2P Browser tray manager not found");
}
@@ -152,6 +157,26 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
}
}
public MenuHandle addMenuHandle(String launchMessage){
try {
_log.info(
"Starting I2P Browser tray manager by testing http://proxy.i2p");
MenuService dtg = startTrayApp();
if (dtg != null) {
_log.info("I2P Browser integrating with I2P tray manager");
MenuHandle handle =
dtg.addMenu(launchMesssage, new Starter(dtg));
dtg.showMenu(SafeHandleLauncher);
dtg.enableMenu(SafeHandleLauncher);
return handle;
} else {
_log.info("I2P Browser tray manager not found");
}
} catch (Exception e) {
_log.error("Error starting I2P Browser tray manager", e);
}
}
// Copied directly from I2PSnark-standalone
/**
* @since 1.4.0
@@ -190,8 +215,8 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
// Ubuntu GNOME does not work, SystemTray.isSupported() returns false
String xdg = System.getenv("XDG_CURRENT_DESKTOP");
boolean dflt = SystemVersion.isWindows() || SystemVersion.isMac() ||
"XFCE".equals(xdg) || "KDE".equals(xdg) ||
"LXDE".equals(xdg);
//"XFCE".equals(xdg) ||
"KDE".equals(xdg) || "LXDE".equals(xdg);
return _context.getProperty(PROP_DTG_ENABLED, dflt);
}

View File

@@ -19,6 +19,11 @@ user_pref("extensions.torlauncher.start_tor", false);
//user_pref("extensions.torlauncher.default_bridge_type", "");
user_pref("extensions.torlauncher.prompt_at_startup", false);
// Resist-fingerprinting and first-party isolation enable
user_pref("privacy.resistFingerprinting", true);
user_pref("privacy.firstparty.isolate", true);
// Use i2p http proxy for all connections and set homepage to safe local form.
// DON'T allow access to the admin panel from the profile we browse i2p with.
@@ -34,6 +39,7 @@ user_pref("network.proxy.socks", "127.0.0.1");
user_pref("network.proxy.socks_port", 4444);
user_pref("network.proxy.share_proxy_settings", true);
user_pref("browser.startup.homepage", "about:blank");
user_pref("dom.security.https_only_mode", false);
user_pref("keyword.enabled", false);
user_pref("extensions.allowPrivateBrowsingByDefault", true);
user_pref("extensions.PrivateBrowsing.notification", false);
@@ -45,4 +51,17 @@ user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.default.sites", "http://planet.i2p/,http://legwork.i2p/,http://i2pwiki.i2p/,http://i2pforums.i2p/,http://zzz.i2p/");
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true);
user_pref("ui.use_standins_for_native_colors", true);
user_pref("webgl.disable-extensions", true);
user_pref("webgl.min_capability_mode", true);
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
user_pref("webgl.enable-webgl2", false);
user_pref("media.navigator.enabled", false);
user_pref("dom.w3c_touch_events.enabled", false);
user_pref("browser.privatebrowsing.autostart", false);
user_pref("browser.display.use_system_colors", false);
user_pref("dom.image-lazy-loading.enabled", false);
user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.enabledScopes", 1);
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);

View File

@@ -1,2 +0,0 @@
main-class=net.i2p.i2pfirefox.I2PBrowser
arguments=-usability

View File

@@ -228,24 +228,4 @@ user_pref("dom.w3c_touch_events.enabled", false);
user_pref("browser.privatebrowsing.autostart", false);
user_pref("browser.display.use_system_colors", false);
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);
user_pref("ui.use_standins_for_native_colors", true);
user_pref("webgl.disable-extensions", true);
user_pref("webgl.min_capability_mode", true);
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
user_pref("webgl.enable-webgl2", false);
user_pref("media.navigator.enabled", false);
user_pref("dom.w3c_touch_events.enabled", false);
user_pref("browser.privatebrowsing.autostart", false);
user_pref("browser.display.use_system_colors", false);
user_pref("dom.image-lazy-loading.enabled", false);
user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.enabledScopes", 1);
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
user_pref("dom.security.https_only_mode", false);
// Resist-fingerprinting and first-party isolation enable
user_pref("privacy.resistFingerprinting", true);
user_pref("privacy.firstparty.isolate", true);
user_pref("browser.fixup.domainsuffixwhitelist.i2p", true);

View File

@@ -1,43 +0,0 @@
#! /usr/bin/env sh
. ./config.sh
#./preprelease.sh
github-release release --user "${GITHUB_USER}" \
--repo "${GITHUB_REPO}" \
--name "Build Tools" \
--description "binaries required for generating the profiles" \
--tag "build-tools"; true
echo "Uploading generated build-tools"
sleep 2s
torsum=$(sha256sum $HOME/go/bin/crx3 | sed "s|$HOME||g")
echo "$torsum"
github-release upload --user "${GITHUB_USER}" \
--replace \
--repo "${GITHUB_REPO}" \
--tag "build-tools" \
--label "crx3 for Linux. ${torsum}" \
--name "crx3-linux" \
--file "$HOME/go/bin/crx3"
echo "Uploaded crx3 linux package"
torsum=$(sha256sum $HOME/go/bin/darwin_amd64/crx3 | sed "s|$HOME||g")
echo "$torsum"
github-release upload --user "${GITHUB_USER}" \
--replace \
--repo "${GITHUB_REPO}" \
--tag "build-tools" \
--label "crx3 for Mac. ${torsum}" \
--name "crx3-osx" \
--file "$HOME/go/bin/darwin_amd64/crx3"
echo "Uploaded crx3 mac package"
torsum=$(sha256sum $HOME/go/bin/windows_amd64/crx3.exe | sed "s|$HOME||g")
echo "$torsum"
github-release upload --user "${GITHUB_USER}" \
--replace \
--repo "${GITHUB_REPO}" \
--tag "build-tools" \
--label "crx3 for Windows. ${torsum}" \
--name "crx3.exe" \
--file "$HOME/go/bin/windows_amd64/crx3.exe"
echo "Uploaded crx3 windows package"
git pull github --tags
git push --all