summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorskydrome2020-02-10 21:10:09 -0500
committerskydrome2020-02-10 21:10:09 -0500
commitd328dff5670423bb00b002d571d7ceb4a8d3b502 (patch)
treec2d19145fc1e147fd7120bf1d8ae4e76f5f00f11
parent9f86ca38d6056a867627e282c982dc41f85ad8e4 (diff)
downloadaur-d328dff5670423bb00b002d571d7ceb4a8d3b502.tar.gz
add chromium-i2p launcher
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
-rw-r--r--chromium-i2p.sh58
3 files changed, 66 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 07ebef2f1da8..bc2a82bb1f52 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -27,6 +27,7 @@ pkgbase = i2p-dev
source = router.config
source = i2prouter.bash
source = i2prouter.sh
+ source = chromium-i2p.sh
sha256sums = SKIP
sha256sums = 644b771ec7f5db3efab3206bf1f896566cdb00d410a54608fda85bdb4c2ad876
sha256sums = df26da04c8415ac24ec73b0dd08d3459a8964553bb77e5da5ab9833b0a31d865
@@ -34,6 +35,7 @@ pkgbase = i2p-dev
sha256sums = 4ee28e022dccaf99043aa2735f05b7270b8eccf040c67f7ef48e114b5ca6e971
sha256sums = 7a19b9f90c8792460fd58e8b8aa435a065e34d29a942479850472510e9d3078a
sha256sums = b5f1a5bb354552acebe2857b9579410f7fd589f2f7d6b12fbbfe4127a2d33fd8
+ sha256sums = 2d5ae5f5379e6ea095bb30c374b493b1fdd47b06aa536760c6c73bb062eb6eef
pkgname = i2p-dev
diff --git a/PKGBUILD b/PKGBUILD
index dc88805cdad4..99ae6b2182c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,7 +26,7 @@ _commit=master
#mirror: https://gitlab.com/I2P/i2p.i2p.git
source=("git+https://github.com/i2p/${_gitname}.git#commit=${_commit}"
'i2prouter.service' 'i2p.tmpfiles' 'wrapper.config' 'router.config'
- 'i2prouter.bash' 'i2prouter.sh')
+ 'i2prouter.bash' 'i2prouter.sh' 'chromium-i2p.sh')
sha256sums=('SKIP'
'644b771ec7f5db3efab3206bf1f896566cdb00d410a54608fda85bdb4c2ad876'
@@ -34,7 +34,8 @@ sha256sums=('SKIP'
'5c57456bf3f364175d036dfc6c6ceea5e57cdda970407829c04d09a4c821a9c0'
'4ee28e022dccaf99043aa2735f05b7270b8eccf040c67f7ef48e114b5ca6e971'
'7a19b9f90c8792460fd58e8b8aa435a065e34d29a942479850472510e9d3078a'
- 'b5f1a5bb354552acebe2857b9579410f7fd589f2f7d6b12fbbfe4127a2d33fd8')
+ 'b5f1a5bb354552acebe2857b9579410f7fd589f2f7d6b12fbbfe4127a2d33fd8'
+ '2d5ae5f5379e6ea095bb30c374b493b1fdd47b06aa536760c6c73bb062eb6eef')
pkgver() {
cd "$_gitname"
@@ -97,6 +98,7 @@ package() {
install -Dm644 "$srcdir/router.config" "opt/i2p/router.config"
install -Dm644 "$srcdir/wrapper.config" "opt/i2p/wrapper.config"
install -Dm755 "$srcdir/i2prouter.sh" "opt/i2p/i2prouter"
+ install -Dm755 "$srcdir/chromium-i2p.sh" "opt/i2p/scripts/chromium-i2p"
install -Dm644 "$srcdir/i2prouter.bash" "usr/share/bash-completion/completions/i2prouter"
install -Dm644 "$srcdir/$_gitname/installer/resources/bash-completion/eepget" \
@@ -107,13 +109,12 @@ package() {
mv opt/i2p/licenses/* "usr/share/licenses/i2p/"
ln -s /opt/i2p/{eepget,i2prouter} "usr/bin/"
- chmod +x opt/i2p/{eepget,i2prouter}
- chmod -x opt/i2p/*.config
+ chmod +x opt/i2p/eepget
sed -i opt/i2p/{eepget,wrapper.config} \
-e 's:%INSTALL_PATH:/opt/i2p:g'
- # dont automatically start the webserver (3) or open a webbrowser (4)
+ # dont automatically start the webserver(3) or open a webbrowser(4)
sed -i opt/i2p/clients.config \
-e "s:clientApp.3.startOnLoad=.*:clientApp.3.startOnLoad=false:" \
-e "s:clientApp.4.startOnLoad=.*:clientApp.4.startOnLoad=false:"
diff --git a/chromium-i2p.sh b/chromium-i2p.sh
new file mode 100644
index 000000000000..e9a9181fcccd
--- /dev/null
+++ b/chromium-i2p.sh
@@ -0,0 +1,58 @@
+ #!/usr/bin/env bash
+set -e
+
+DATADIR=${XDG_CONFIG_HOME:-$HOME/.config}/chromium-i2p
+
+[[ ! -f $DATADIR/.config ]] && {
+ echo "creating config..."
+ install -dm700 $DATADIR
+ cat <<< '
+CACHEDIR=/dev/shm/chromium-i2p # store in ram, or
+#CACHEDIR=$DATADIR/.tmp # keep on disk
+CACHESIZE=128000000 # cache size in bytes
+
+INCOGNITO=--incognito # comment out if you wish to have
+ # urlhistory, passwords, etc. saved
+PROXY=127.0.0.1:4444
+CONSOLE=127.0.0.1:7657
+' >$DATADIR/.config
+ echo "$DATADIR/.config"
+}
+
+source $DATADIR/.config
+
+/usr/bin/chromium "$INCOGNITO" \
+ --user-data-dir="$DATADIR" \
+ --disk-cache-dir="$CACHEDIR" \
+ --disk-cache-size="$CACHESIZE" \
+ --proxy-server="$PROXY" \
+ --proxy-bypass-list=127.0.0.1,localhost \
+ --{connectivity-check,gcm-checkin,gcm-registration,crash-server,google-apis,google-base,override-metrics-upload,realtime-reporting,test-logging}-url=null \
+ --disable-3d-apis \
+ --disable-account-consistency \
+ --disable-background-networking \
+ --disable-breakpad \
+ --disable-bundled-ppapi-flash \
+ --disable-client-side-phishing-detection \
+ --disable-cloud-import \
+ --disable-default-apps \
+ --disable-domain-reliability \
+ --disable-file-system \
+ --disable-logging \
+ --disable-notifications \
+ --disable-ntp-popular-sites \
+ --disable-reading-from-canvas \
+ --disable-remote-fonts \
+ --disable-speech-api \
+ --disable-sync \
+ --disable-translate \
+ --disable-voice-input \
+ --enable-low-end-device-mode \
+ --enable-strict-mixed-content-checking \
+ --force-dark-mode \
+ --no-default-browser-check \
+ --no-pings \
+ --no-report-upload \
+ --site-per-process \
+ --use-fake-device-for-media-stream \
+ ${@:-$CONSOLE}