Merge branch 'apptabs' into 'master'

Affix apptabs to front of tab order

See merge request idk/I2P-in-Private-Browsing-Mode-Firefox!4
This commit is contained in:
idk
2020-09-26 03:25:52 +00:00
7 changed files with 170 additions and 72 deletions

View File

@@ -37,11 +37,11 @@ clean: rc clean-artifacts
## EVEN RELEASES are AMO RELEASES
## ODD RELEASES are SELFHOSTED RELEASES
MOZ_VERSION=0.78
VERSION=0.77
MOZ_VERSION=0.80
VERSION=0.79
## INCREMENT THIS EVERY TIME YOU DO A RELEASE
LAST_VERSION=0.75
LAST_VERSION=0.77
YELLOW=F7E59A
ORANGE=FFC56D
@@ -97,20 +97,20 @@ xpi: getxpi
version:
sed -i 's|7647|7657|g' *.js* torrent/*.js*
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)\",|g' manifest.json
sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)\",|g' manifest.json
# sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)\",|g' manifest.json
sed -si 's|$(shell grep $(LAST_VERSION) _locales/en/messages.json)| "message": "$(VERSION)",|g' _locales/en/messages.json; true
sed -si 's|$(shell grep $(MOZ_VERSION) _locales/en/messages.json)| "message": "$(VERSION)",|g' _locales/en/messages.json; true
moz-version:
sed -i 's|7647|7657|g' *.js* torrent/*.js*
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(MOZ_VERSION)\",|g' manifest.json
sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(MOZ_VERSION)\",|g' manifest.json
# sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(MOZ_VERSION)\",|g' manifest.json
sed -si 's|$(shell grep $(LAST_VERSION) _locales/en/messages.json)| "message": "$(MOZ_VERSION)",|g' _locales/en/messages.json; true
sed -si 's|$(shell grep $(VERSION) _locales/en/messages.json)| "message": "$(MOZ_VERSION)",|g' _locales/en/messages.json; true
rhz-version:
sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)1\",|g' manifest.json
sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)1-rhizome\",|g' manifest.json
# sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)1-rhizome\",|g' manifest.json
sed -i 's|7657|7647|g' *.js* torrent/*.js*
zip: version

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
i2psetproxy.js (0.79-1) UNRELEASED; urgency=low
* Pin application tabs to the front of the tab order
* Refine pageaction behavior
-- idk <hankhill19580@gmail.com> Mon, 24 SEP 2020 20:18:03 -0400
i2psetproxy.js (0.77-1) UNRELEASED; urgency=low
* Implement x-i2p-location header

View File

@@ -32,7 +32,88 @@ command:</p>
<pre><code> make deb
</code></pre>
<p>and then you can install it with:</p>
<pre><code> sudo apt install ../i2psetproxy.js_*.deb
</code></pre>
<h2>Bittorrent Download:</h2>
<p>The self-hosted plugin is available from bittorrent both within the I2P and Clearnet Bittorrent network(With a web seed to support it in case one goes dead).</p>
<ul>
<li>
<a href="magnet:?xt=urn:btih:5f45673bc107ec42a8b4d02aa4d5d7487949fc66">Magnet Link</a>
</li>
<li>
<a href="./i2ppb@eyedeekay.github.io.xpi.torrent">Get the .torrent file</a>
</li>
</ul>
<h2>Usage:</h2>
<ul>
<li>Basically, it "Just Works." After you install the plugin, browsing to an I2P domain will automatically stop the current tab and re-open the I2P site in an I2P Browser tab.</li>
<li>Besides that, four bookmarks are added to the "Bookmarks Toolbar," which will take you to visit your Java I2P applications, or the "Simplified I2P Landing Page" embedded in the plugin:</li>
<li><img alt="Landing page" src="lander.png" title="">
</li>
<li>Also, there's a menu for accessing I2P functionality while you're browsing. It lets you control a few settings in a granular way.</li>
<li><img alt="Menu" src="menu.png" title="">
</li>
<li>You can re-enable WebRTC but force it to always use the proxy that is enforced by the tab.</li>
<li>You can either force the browser to delete all history for I2P sites immediately, or you can close all your I2P Browser tabs at once and delete the history for I2P browsing when you're done.</li>
<li>That's all there is to it! Your browser is configured to safely use and administer I2P.</li>
<li>Optionally, you can add I2PSnark-RPC and use Bittorrent-over-I2P via the transmission-rpc interface. To do this, have a look at the torrent guide: <a href="torrent/index.html">Torrent guide</a>
</li>
</ul>
<h3>Features</h3>
<ul>
<li>[done] <strong>Provide</strong> a way to launch into an I2P-Specific contextual identity (container). Intercept requests to .i2p domains and automatically route them to the I2P container. Isolate the router console from other local applications by automatically intercepting requests to the router console to another container.</li>
<li><img alt="Visiting i2p-projekt.i2p" src="i2psetproxy.js.png" title="">
</li>
<li>[done] <strong>Indicate</strong> the I2P browser is in use visually. Find an acceptable way to indicate it on Android.</li>
<li><img alt="Visiting webmail" src="susimail.png" title="">
</li>
<li>[done] <strong>Set</strong> the http proxy to use the local I2P proxy automatically. Provide specific configuration for other types of I2P proxies(SOCKS, isolating HTTP)</li>
<li>[done] <strong>Disable</strong> risky webRTC features/offer the option to re-enable them with the proxy enforced.</li>
<li>[done] <strong>Change</strong> the color of the browser window to indicate that I2P is in use</li>
<li><img alt="Visiting i2ptunnel" src="i2ptunnel.png" title="">
</li>
<li>[ready] <strong>Provide</strong> help in a variety of languages.</li>
<li>[done] <strong>Monitor</strong> the health and readiness of the I2P router it is instructed to use. Currently the plugin checks whether the HTTP Proxy is working by fetching an image from "http://proxy.i2p" and displaying a result. A work-in-progress binding to i2pcontrol is available in ./i2pcontrol, it is inert at this time.</li>
<li><img alt="Visiting toopie.html" src="toopie.png" title="">
</li>
<li>[Done] <strong>Handle</strong> router console applications under their own origins and within their own contextual identity. (1) The router console is automatically confined to it's own container tab. (2) Use a custom protocol handler to place each i2p application/plugin under it's own origin, shortening router console URL's and placing applications under their own origin.</li>
<li><img alt="Visiting routerconsole" src="routerconsole.png" title="">
</li>
<li>[Done] <strong>Handle Torrents</strong> by talking to i2psnark-rpc plugin and then adding them directly into the Firefox downloads drop-downs, menus, etc. If I can.</li>
<li><img alt="Visiting i2psnark" src="i2psnark.png" title="">
</li>
<li><img alt="Monitoring torrents" src="transmissionrpc.png" title="">
</li>
<li>[Started] <strong>Indicate</strong> the level of authenticity provided by TLS. TLS is optional on I2P for now, but some sites offer it anyway. TLS support is experimental and in the works.</li>

View File

@@ -26,7 +26,7 @@
],
"manifest_version": 2,
"name": "__MSG_extensionName__",
"version": "0.78",
"version": "0.77",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox",
"icons": {

View File

@@ -5,12 +5,25 @@
<link type="application/atom+xml" rel="self" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases.atom"/>
<title>Release notes from I2P-in-Private-Browsing-Mode-Firefox</title>
<updated>2020-06-23T03:21:35Z</updated>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.77</id>
<updated>2020-09-25T00:19:45Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.77"/>
<title>0.77</title>
<enclosure url="magnet:?xt=urn:btih:5f45673bc107ec42a8b4d02aa4d5d7487949fc66" type="application/x-bittorrent" />
<content type="html">&lt;p&gt;Merge pull request &lt;a class=&quot;issue-link js-issue-link&quot; href=&quot;https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/pull/100&quot;&gt;#100&lt;/a&gt; from eyedeekay/bookmarks&lt;/p&gt;
&lt;p&gt;make the bookmarks part of a subdirectory&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.75</id>
<updated>2020-06-23T03:22:59Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.75"/>
<title>0.75</title>
<enclosure url="magnet:?xt=urn:btih:61dcc15f0363cb027ed7d56a9dcff3408dfdf9c4" type="application/x-bittorrent" />
<content type="html">&lt;p&gt;A simple plugin for configuring a Firefox based web browser to isolate I2P&lt;br&gt;
Browsing to a single contextual identity, thus creating an I2P in Private&lt;br&gt;
Browsing mode. It requires the use of a pre-installed I2P Router.&lt;br&gt;
@@ -182,27 +195,4 @@ i2psetproxy.js (0.59-1) UNRELEASED; urgency=low&lt;/p&gt;
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
<entry>
<id>tag:github.com,2008:Repository/169256012/0.57</id>
<updated>2020-01-06T17:16:33Z</updated>
<link rel="alternate" type="text/html" href="https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/tag/0.57"/>
<title>0.57</title>
<content type="html">&lt;h1&gt;I2P in Private Browsing Mode&lt;/h1&gt;
&lt;p&gt;A simple plugin for configuring a Firefox based web browser to isolate I2P&lt;br&gt;
Browsing to a single contextual identity, thus creating an I2P in Private&lt;br&gt;
Browsing mode. It requires the use of a pre-installed I2P Router.&lt;br&gt;
i2psetproxy.js (0.57-1) UNRELEASED; urgency=low&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Snowflake compatibility&lt;/li&gt;
&lt;li&gt;Lots of small compatibility fixes&lt;/li&gt;
&lt;li&gt;More linter errors&lt;/li&gt;
&lt;li&gt;Make it multilingual again&lt;/li&gt;
&lt;li&gt;Distribute a torrent and a magnet link with the plugin of the plugin&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;-- idk &lt;a href=&quot;mailto:hankhill19580@gmail.com&quot;&gt;hankhill19580@gmail.com&lt;/a&gt; Thu, 4 JAN 2019 16:43:58 -0400&lt;/p&gt;</content>
<author>
<name>eyedeekay</name>
</author>
<media:thumbnail height="30" width="30" url="https://avatars3.githubusercontent.com/u/8733713?s=60&amp;v=4"/>
</entry>
</feed>

View File

@@ -17,5 +17,21 @@ browser.runtime.onMessage.addListener(request => {
};
}
}
if (request.req === 'i2p-torrentlocation') {
response = 'no-alt-location';
const metas = document.getElementsByTagName('meta');
for (let i = 0; i < metas.length; i++) {
try {
tag = metas[i].getAttribute('http-equiv');
if (tag.toUpperCase() === 'I2P-TORRENTLOCATION') {
response = metas[i].getAttribute('content');
}
if (tag.toUpperCase() === 'X-I2P-TORRENTLOCATION') {
response = metas[i].getAttribute('content');
}
}catch{
};
}
}
return Promise.resolve({content: response});
});

View File

@@ -598,31 +598,33 @@ var coolheadersSetup = function(e) {
window.setTimeout(() => {
for (i = 0; i < e.responseHeaders.length; i++) {
let header = e.responseHeaders[i];
if (header.name.toUpperCase() === 'I2P-LOCATION' || header.name.toUpperCase() === 'X-I2P-LOCATION') {
browser.pageAction.setPopup({
tabId: e.tabId,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
browser.pageAction.show(e.tabId);
break;
}
if (header.name.toUpperCase() === 'I2P-TORRENTLOCATION' || header.name.toUpperCase() === 'X-I2P-TORRENTLOCATION') {
browser.pageAction.setPopup({
tabId: tabId.id,
popup: 'torrent.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.show(e.tabId);
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
break;
if (e.url.startsWith('https')) {
if (header.name.toUpperCase() === 'I2P-LOCATION' || header.name.toUpperCase() === 'X-I2P-LOCATION') {
browser.pageAction.setPopup({
tabId: e.tabId,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
browser.pageAction.show(e.tabId);
break;
}
if (header.name.toUpperCase() === 'I2P-TORRENTLOCATION' || header.name.toUpperCase() === 'X-I2P-TORRENTLOCATION') {
browser.pageAction.setPopup({
tabId: tabId.id,
popup: 'torrent.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: e.tabId});
browser.pageAction.show(e.tabId);
browser.pageAction.setTitle({
tabId: e.tabId,
title: header.value
});
break;
}
}
}
resolve({responseHeaders: e.responseHeaders});
@@ -633,21 +635,23 @@ var coolheadersSetup = function(e) {
function getClearTab(tobj) {
function getTabURL(tab) {
browser.tabs.sendMessage( tab.id, {'req':'i2p-location'}).then( response => {
if (response.content.toUpperCase() != "no-alt-location"){
browser.pageAction.setPopup({
tabId: tab.id,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: tab.id});
browser.pageAction.setTitle({
tabId: tab.id,
title: response.content
});
browser.pageAction.show(tab.id);
}
});
console.log("(pageaction)", tab.id, tab.url)
if (tab.url.startsWith("https")){
browser.tabs.sendMessage( tab.id, {'req':'i2p-location'}).then( response => {
if (response.content.toUpperCase() != "NO-ALT-LOCATION"){
browser.pageAction.setPopup({
tabId: tab.id,
popup: 'location.html'
});
browser.pageAction.setIcon({path: 'icons/i2plogo.png', tabId: tab.id});
browser.pageAction.setTitle({
tabId: tab.id,
title: response.content
});
browser.pageAction.show(tab.id);
}
});
console.log("(pageaction)", tab.id, tab.url)
}
}
browser.tabs.get(tobj.tabId).then(getTabURL, onError)
}