Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
41d7c188f8 | ||
![]() |
4e254d59c3 | ||
![]() |
629162372e | ||
![]() |
b1bfd39327 | ||
![]() |
3ee2c7a10d | ||
![]() |
44ce1d2ed2 | ||
![]() |
7cef932d3d | ||
![]() |
c063eae03c | ||
![]() |
7f9bcbe1c0 | ||
![]() |
e023469b93 | ||
![]() |
0cf817bb09 | ||
![]() |
865c0fca84 | ||
![]() |
6ecd993531 | ||
![]() |
b6ab50c337 | ||
![]() |
3ad98b38ab | ||
![]() |
8ba4651e32 | ||
![]() |
3e5b9c049d |
@@ -80,6 +80,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Sat, August 21
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Adds support for passing the -private flag to start Firefox with –private-window and Chromium –incognito
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
Fri, August 20
|
||||
</h2>
|
||||
|
@@ -1,3 +1,8 @@
|
||||
Sat, August 21
|
||||
--------------
|
||||
|
||||
- Adds support for passing the -private flag to start Firefox with --private-window and Chromium --incognito
|
||||
|
||||
Fri, August 20
|
||||
--------------
|
||||
|
||||
|
11
build.xml
11
build.xml
@@ -32,7 +32,16 @@
|
||||
<arg value="-o" />
|
||||
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js.crx" />
|
||||
</exec>
|
||||
<!--<exec executable="crx3" failonerror="true">
|
||||
<!--
|
||||
TODO: I don't want to deal with licensing issues while on a headfull of cold
|
||||
medicine and COVID. SO for now I'm only including a plugin written by a person
|
||||
who I'm pretty sure isn't going to sue me for it(me). In order to more closely
|
||||
mirror the behavior of the Firefox profile, we should at least include a script
|
||||
blocking plugin, such as ScriptSafe. uBlock was also suggested and I tend to
|
||||
agree. However, since we have to load extensions unpacked, they won't be updated
|
||||
automatically. This is probably good for working against fingerprinting but it's
|
||||
also more work should a plugin have a security vulnerability.
|
||||
<exec executable="crx3" failonerror="true">
|
||||
<arg value="download"/>
|
||||
<arg value="cjpalhdlnbpafiamejdnhcphjbkeiagm" />
|
||||
<arg value="-u=true"/>
|
||||
|
3
i2pchromium-private.cmd
Executable file
3
i2pchromium-private.cmd
Executable file
@@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PChromium -private
|
3
i2pfirefox-private.cmd
Executable file
3
i2pfirefox-private.cmd
Executable file
@@ -0,0 +1,3 @@
|
||||
:; dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd); java -cp "$dir"/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox -private; exit $?
|
||||
@ECHO OFF
|
||||
java -cp %cd%/src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox -private
|
@@ -2,9 +2,9 @@
|
||||
|
||||
GITHUB_USER=eyedeekay
|
||||
GITHUB_REPO=i2p.plugins.firefox
|
||||
GITHUB_NAME="Which fixes one tiny bug that was bothering me"
|
||||
GITHUB_NAME="Which adds the ability to pass the -private flag to the command line to launch a private browser instance."
|
||||
GITHUB_DESCRIPTION=$(cat CHANGES.md)
|
||||
GITHUB_TAG=0.0.11
|
||||
GITHUB_TAG=0.0.15
|
||||
ant distclean
|
||||
ant jar freeZip
|
||||
github-release release --user "${GITHUB_USER}" \
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Mon Aug 15 01:27:49 EDT 2022
|
||||
build.number=87
|
||||
#Sun Aug 21 17:53:26 EDT 2022
|
||||
build.number=88
|
||||
|
@@ -517,7 +517,7 @@ user_pref("security.mixed_content.block_display_content", true);
|
||||
* [SETTING] Privacy & Security>HTTPS-Only Mode (and manage exceptions)
|
||||
* [TEST] http://example.com [upgrade]
|
||||
* [TEST] http://httpforever.com/ [no upgrade] ***/
|
||||
user_pref("dom.security.https_only_mode", true); // [FF76+]
|
||||
user_pref("dom.security.https_only_mode", false); // [FF76+]
|
||||
// user_pref("dom.security.https_only_mode_pbm", true); // [FF80+]
|
||||
/* 1245: enable HTTPS-Only mode for local resources [FF77+] ***/
|
||||
// user_pref("dom.security.https_only_mode.upgrade_local", true);
|
||||
|
@@ -77,7 +77,7 @@ public class I2PChromium {
|
||||
int i = 0;
|
||||
for (String s : path) {
|
||||
for (String exe : exes) {
|
||||
exePath[i] = s + exe;
|
||||
exePath[i] = s + "\\" + exe;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -202,8 +202,10 @@ public class I2PChromium {
|
||||
for (String chrome : chromees) {
|
||||
File chromeFile = new File(chrome);
|
||||
if (chromeFile.exists()) {
|
||||
System.out.println("Found valid chromium at " + chrome);
|
||||
validChromiums.add(chrome);
|
||||
}
|
||||
System.out.println("chrome at " + chrome + "does not exist");
|
||||
}
|
||||
return validChromiums.toArray(new String[validChromiums.size()]);
|
||||
}
|
||||
@@ -339,11 +341,14 @@ public class I2PChromium {
|
||||
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/ublock.js").getAbsolutePath()
|
||||
+","+
|
||||
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/scriptsafe.js").getAbsolutePath();*/
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+20] = args[i];
|
||||
if (args.length > 0) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+20] = args[i];
|
||||
}
|
||||
}
|
||||
return new ProcessBuilder(newArgs).directory(I2PChromiumProfileBuilder.runtimeDirectory(true));
|
||||
} else {
|
||||
System.out.println("No Chromium found.");
|
||||
return new ProcessBuilder(args);
|
||||
}
|
||||
}
|
||||
@@ -444,21 +449,20 @@ public class I2PChromium {
|
||||
} else {
|
||||
pb = this.defaultProcessBuilder();
|
||||
}
|
||||
|
||||
Process p = null;
|
||||
try{
|
||||
System.out.println(pb.command());
|
||||
p = pb.start();
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}finally{
|
||||
Process p = pb.start();
|
||||
sleep(2000);
|
||||
System.out.println("I2PChromium");
|
||||
try{
|
||||
System.out.println("Waiting for I2PChromium to close...");
|
||||
p.waitFor();
|
||||
int exit = p.waitFor();
|
||||
System.out.println("I2PChromium exited with value: "+exit);
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -474,8 +478,24 @@ public class I2PChromium {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
boolean privateBrowsing = false;
|
||||
if (args != null && args.length > 0) {
|
||||
System.out.println("checking for private browsing");
|
||||
if (args[0].equals("-private")) {
|
||||
privateBrowsing = true;
|
||||
System.out.println("private browsing is true, profile will be discarded at end of session");
|
||||
}
|
||||
}
|
||||
System.out.println("I2PChromium");
|
||||
I2PChromium i2pChromium = new I2PChromium();
|
||||
i2pChromium.launch();
|
||||
}
|
||||
i2pChromium.launch(privateBrowsing);
|
||||
}
|
||||
private static void sleep(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException bad) {
|
||||
bad.printStackTrace();
|
||||
throw new RuntimeException(bad);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -70,12 +70,19 @@ public class I2PFirefox {
|
||||
new File(programFiles86, "Waterfox/").toString(),
|
||||
new File(programFiles, "Librewolf/").toString(),
|
||||
};
|
||||
String[] exes = new String[]{"firefox.exe", "firefox-bin.exe", "firefox-esr.exe", "waterfox.exe", "waterfox-bin.exe", "librewolf.exe"};
|
||||
String[] exes = new String[]{
|
||||
"firefox.exe",
|
||||
"firefox-bin.exe",
|
||||
"firefox-esr.exe",
|
||||
"waterfox.exe",
|
||||
"waterfox-bin.exe",
|
||||
"librewolf.exe",
|
||||
};
|
||||
String[] exePath = new String[path.length * exes.length];
|
||||
int i = 0;
|
||||
for (String s : path) {
|
||||
for (String exe : exes) {
|
||||
exePath[i] = s + exe;
|
||||
exePath[i] = s + "\\" + exe;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -200,8 +207,10 @@ public class I2PFirefox {
|
||||
for (String firefox : firefoxes) {
|
||||
File firefoxFile = new File(firefox);
|
||||
if (firefoxFile.exists()) {
|
||||
System.out.println("Found valid firefox at " + firefox);
|
||||
validFirefoxes.add(firefox);
|
||||
}
|
||||
System.out.println("firefox at " + firefox + "does not exist");
|
||||
}
|
||||
return validFirefoxes.toArray(new String[validFirefoxes.size()]);
|
||||
}
|
||||
@@ -273,7 +282,7 @@ public class I2PFirefox {
|
||||
* the default profile.
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public ProcessBuilder privateProcessBuilder(String[] args) {
|
||||
public ProcessBuilder privateProcessBuilder() {
|
||||
return processBuilder(new String[]{"--private-window"});
|
||||
}
|
||||
|
||||
@@ -294,11 +303,14 @@ public class I2PFirefox {
|
||||
newArgs[0] = firefox;
|
||||
newArgs[1] = "--profile";
|
||||
newArgs[2] = I2PFirefoxProfileBuilder.profileDirectory();
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+3] = args[i];
|
||||
if (args.length > 0) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+3] = args[i];
|
||||
}
|
||||
}
|
||||
return new ProcessBuilder(newArgs).directory(I2PFirefoxProfileBuilder.runtimeDirectory(true));
|
||||
} else {
|
||||
System.out.println("No Firefox found.");
|
||||
return new ProcessBuilder(args);
|
||||
}
|
||||
}
|
||||
@@ -393,26 +405,26 @@ public class I2PFirefox {
|
||||
}
|
||||
}
|
||||
if (waitForProxy()){
|
||||
ProcessBuilder pb = null;
|
||||
ProcessBuilder pb;
|
||||
if (privateWindow) {
|
||||
pb = privateProcessBuilder(new String[]{});
|
||||
pb = privateProcessBuilder();
|
||||
} else {
|
||||
pb = defaultProcessBuilder();
|
||||
}
|
||||
Process p = null;
|
||||
try{
|
||||
System.out.println(pb.command());
|
||||
p = pb.start();
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}finally{
|
||||
Process p = pb.start();
|
||||
System.out.println("I2PFirefox");
|
||||
sleep(2000);
|
||||
try{
|
||||
System.out.println("Waiting for I2PFirefox to close...");
|
||||
p.waitFor();
|
||||
int exit = p.waitFor();
|
||||
System.out.println("I2PFirefox exited with value: "+exit);
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -430,8 +442,25 @@ public class I2PFirefox {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
boolean privateBrowsing = false;
|
||||
if (args != null && args.length > 0) {
|
||||
System.out.println("checking for private browsing");
|
||||
if (args[0].equals("-private")) {
|
||||
privateBrowsing = true;
|
||||
System.out.println("private browsing is true, profile will be discarded at end of session");
|
||||
}
|
||||
}
|
||||
System.out.println("I2PFirefox");
|
||||
I2PFirefox i2pFirefox = new I2PFirefox();
|
||||
i2pFirefox.launch();
|
||||
}
|
||||
i2pFirefox.launch(privateBrowsing);
|
||||
}
|
||||
|
||||
private static void sleep(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException bad) {
|
||||
bad.printStackTrace();
|
||||
throw new RuntimeException(bad);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user