Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
erosman authored Sep 19, 2023
1 parent bcfda83 commit 5c943a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/content/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@ <h2 id="save">Save</h2>


<h1 id="proxy">Proxy</h1>
<p>Connections to localhost, 127.0.0.1/8, and ::1 are never proxied.</p>
<p>Connections to <code>localhost</code>, <code>127.0.0.1/8</code>, and <code>::1</code> are never proxied.</p>
<ul>
<li><a href="https://searchfox.org/mozilla-central/source/browser/locales/en-US/browser/preferences/connection.ftl#64" target="_blank">Connections to localhost, 127.0.0.1/8, and ::1 are never proxied</a></li>
<li><a href="https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md#Implicit-bypass-rules" target="_blank">Implicit bypass rules</a></li>
<li><a href="https://zzz.buzz/2019/12/12/proxy-localhost-and-loopback-in-chrome/" target="_blank">Proxy localhost and loopback addresses in Chrome</a></li>
</ul>
<p class="note">In Chrome FoxyProxy uses PAC and above rule is fully enforced. In Firefox API, it requires further testing.</p>

<!-- <p class="note">In Chrome FoxyProxy uses PAC and above rule is fully enforced. In Firefox API, it requires further testing.</p> -->

<!-- <p>Some options are not available in Chrome, but has been left for when sharing preferences between Chrome & Firefox.</p> -->

Expand Down
9 changes: 5 additions & 4 deletions src/content/on-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export class OnRequest {

static {
// --- default values
this.mode = 'disable'; // default start
this.proxy = null; // needed only in Single Proxy
this.data = []; // needed only in Proxy by Pattern
this.mode = 'disable';
this.proxy = null; // only needed in Single Proxy
this.data = []; // only needed in Proxy by Pattern
this.globalExclude = [];
this.proxyDNS = true; // default true
this.proxyDNS = true;

// --- Firefox Only
browser?.proxy?.onRequest?.addListener(e => this.#process(e), {urls: ['<all_urls>']});
Expand Down Expand Up @@ -77,6 +77,7 @@ export class OnRequest {
// proxy.onRequest does not have a default localhost bypass
// proxy.onRequest only apply to http/https/ws/wss
// Implementing a default localhost bypass
// it can't catch a domain set by user to 127.0.0.1 in the hosts file
static #bypass(url) {
const [, host] = url.split(/:\/\/|\//); // hostname with/without port
const isIP = /^[\d.:]+$/.test(host);
Expand Down

0 comments on commit 5c943a9

Please sign in to comment.