Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
7cef932d3d | |||
c063eae03c | |||
7f9bcbe1c0 | |||
e023469b93 | |||
0cf817bb09 | |||
865c0fca84 | |||
6ecd993531 | |||
b6ab50c337 | |||
3ad98b38ab | |||
8ba4651e32 | |||
3e5b9c049d | |||
e5d36aff8f |
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"/>
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
GITHUB_USER=eyedeekay
|
||||
GITHUB_REPO=i2p.plugins.firefox
|
||||
GITHUB_NAME="Which moves the launcher scripts around slightly"
|
||||
GITHUB_NAME="Which fixes a Windows-specific bug"
|
||||
GITHUB_DESCRIPTION=$(cat CHANGES.md)
|
||||
GITHUB_TAG=0.0.10
|
||||
GITHUB_TAG=0.0.14
|
||||
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
|
||||
|
@ -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+19] = 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,14 +449,9 @@ 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();
|
||||
System.out.println("I2PChromium");
|
||||
try{
|
||||
System.out.println("Waiting for I2PChromium to close...");
|
||||
@ -459,6 +459,8 @@ public class I2PChromium {
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,19 +405,15 @@ 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");
|
||||
try{
|
||||
System.out.println("Waiting for I2PFirefox to close...");
|
||||
@ -413,6 +421,8 @@ public class I2PFirefox {
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}catch(Exception e){
|
||||
System.out.println("Error: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user