From 40b3d495e40c20da3f925a36cd4fd47bf01b2a8f Mon Sep 17 00:00:00 2001 From: idk Date: Tue, 5 Jul 2022 22:35:45 -0400 Subject: [PATCH] bunch of cool flatpak revisions --- flatpak-daemon.sh | 6 ++++++ flatpak-tbb.sh | 2 +- org.i2pgit.idk.i2p.plugins.tor-manager.yml | 9 ++++++++- supervise/supervise.go | 8 ++++---- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100755 flatpak-daemon.sh diff --git a/flatpak-daemon.sh b/flatpak-daemon.sh new file mode 100755 index 0000000..1035eda --- /dev/null +++ b/flatpak-daemon.sh @@ -0,0 +1,6 @@ +#! /usr/bin/env sh +export TOR_MANAGER_CLEARNET_MIRROR=true +export TOR_MANAGER_REQUIRE_PASSWORD=false +export TOR_MANAGER_NEVER_USE_TOR=true +nohup /app/bin/i2p.plugins.tor-manager -nevertor -p2p=false -directory ~/.var/app/org.i2pgit.idk.i2p.plugins.tor-manager 2> ~/.var/app/org.i2pgit.idk.i2p.plugins.tor-manager/tor-manager.err.log 1> ~/.var/app/org.i2pgit.idk.i2p.plugins.tor-manager/tor-manager.err.log & +/app/bin/i2p.plugins.tor-manager -nevertor -p2p=false -i2pconfig -directory ~/.var/app/org.i2pgit.idk.i2p.plugins.tor-manager \ No newline at end of file diff --git a/flatpak-tbb.sh b/flatpak-tbb.sh index 3bb6bbf..d2d8831 100644 --- a/flatpak-tbb.sh +++ b/flatpak-tbb.sh @@ -1,2 +1,2 @@ #! /usr/bin/env sh -TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false TOR_MANAGER_NEVER_USE_TOR=true /app/bin/i2p.plugins.tor-manager -p2p=false -torbrowser -directory ~/.var/app/org.i2pgit.idk.i2p.plugins.tor-manager \ No newline at end of file +TOR_MANAGER_CLEARNET_MIRROR=true TOR_MANAGER_REQUIRE_PASSWORD=false /app/bin/i2p.plugins.tor-manager -p2p=false -torbrowser -directory ~/.var/app/org.i2pgit.idk.i2p.plugins.tor-manager \ No newline at end of file diff --git a/org.i2pgit.idk.i2p.plugins.tor-manager.yml b/org.i2pgit.idk.i2p.plugins.tor-manager.yml index 7cc6b77..23d635c 100644 --- a/org.i2pgit.idk.i2p.plugins.tor-manager.yml +++ b/org.i2pgit.idk.i2p.plugins.tor-manager.yml @@ -3,7 +3,7 @@ runtime: org.kde.Platform runtime-version: 5.15-21.08 sdk: org.kde.Sdk separate-locales: false -command: i2p.plugins.tor-manager.sh +command: i2p.plugins.tor-manager-daemon.sh finish-args: - --share=ipc - --share=network @@ -39,6 +39,7 @@ modules: - install -D -m755 flatpak.sh /app/bin/i2p.plugins.tor-manager.sh - install -D flatpak.desktop /app/share/applications/org.i2pgit.idk.i2p.plugins.tor-manager.desktop - install -D -m755 flatpak-tbb.sh /app/bin/i2p.plugins.tor-manager-tbb.sh + - install -D -m755 flatpak-daemon.sh /app/bin/i2p.plugins.tor-manager-daemon.sh - install -D flatpak-tbb.desktop /app/share/applications/org.i2pgit.idk.i2p.plugins.tor-manager-tbb.desktop - install -D garliconion.png /app/share/icons/hicolor/128x128/apps/org.i2pgit.idk.i2p.plugins.tor-manager.png - install -D LICENSE /var/lib/i2pbrowser/LICENSE @@ -49,6 +50,12 @@ modules: path: flatpak.sh - type: file path: flatpak.desktop + - type: file + path: flatpak-tbb.sh + - type: file + path: flatpak-tbb.desktop + - type: file + path: flatpak-daemon.sh - type: file path: garliconion.png - type: file diff --git a/supervise/supervise.go b/supervise/supervise.go index 45024f5..18f8d8a 100644 --- a/supervise/supervise.go +++ b/supervise/supervise.go @@ -505,10 +505,6 @@ func (s *Supervisor) RunSpecificTBBWithOfflineClearnetProfile(profiledata, torbr defaultpage = profiledata + "/index.html" } } - - if len(s.PTAS()) > 0 { - defaultpage = s.PTAS()[0] - } if editor { defaultpage = "http://127.0.0.1:7685" clearnet := true @@ -534,6 +530,10 @@ func (s *Supervisor) RunSpecificTBBWithOfflineClearnetProfile(profiledata, torbr s.UnpackPath = UNPACK_URL() } } + return s.RunSpecificTBBWithOfflineClearnetProfileAndPage(profiledata, torbrowserdata, offline, clearnet, defaultpage) +} + +func (s *Supervisor) RunSpecificTBBWithOfflineClearnetProfileAndPage(profiledata, torbrowserdata string, offline, clearnet bool, defaultpage string) error { tbget.ARCH = ARCH() if s.Lang == "" { s.Lang = DEFAULT_TB_LANG