Skip to content

Instantly share code, notes, and snippets.

View unixfox's full-sized avatar

Émilien (perso) unixfox

View GitHub Profile
function FindProxyForURL(url, host) {
if (url.substring(0, 5) == 'http:' || url.substring(0, 6) == 'https:') {
return "HTTP 192.168.192.10:8080";
}
return "DIRECT";
}
@unixfox
unixfox / background.js
Last active May 1, 2019 13:40
Firefox web extension that enable a proxy if on mobile/cellular network
if (navigator.connection.type === "cellular") {
browser.proxy.register(
"pac.js"
);
}
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Searx Belgium</ShortName>
<Description>a privacy-respecting, hackable metasearch engine</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image>https://searx.be/static/themes/oscar/img/favicon.png</Image>
<LongName>searx metasearch</LongName>
<Url type="text/html" method="post" template="https://searx.be/search">
<Param name="q" value="{searchTerms}" />
</Url>
@unixfox
unixfox / searx_auto_complete_post.js
Created May 18, 2019 16:42
Searx auto complete
searx = {};
searx.method = "POST";
searx.autocompleter = true;
@unixfox
unixfox / google.py
Last active May 25, 2019 12:47
Google fixed engine Searx
# Google (Web)
#
# @website https://www.google.com
# @provide-api yes (https://developers.google.com/custom-search/)
#
# @using-api no
# @results HTML
# @stable no (HTML can change)
# @parse url, title, content, suggestion
@unixfox
unixfox / README.md
Last active September 20, 2022 05:37
Block Cloudflare MITM attack

This is a source code of BCMA's "Block Cloudflare MITM Attack".

PRs are welcome.

This add-on will block, notify, or redirect your request if the target website is using Cloudflare.
@unixfox
unixfox / recaptchafirefoxaudio.md
Last active March 17, 2020 16:54
I got the audio recaptcha V2 working correctly with Firefox while still using privacy oriented extensions

While searching why Google Recaptcha audio doesn't work on my Firefox:

I found that Google is trying to recognize if my browser is really a Firefox browser by applying a technique called canvas fingerprinting. The reason why the Google Recaptcha audio challenge didn't work for me is I'm using an extension that change my user agent every 10 minutes (Random User-Agent).

I stopped using this extension and switched to Trace. You may enable some features in the extension's settings (personally I enabled everything to be as untraceable as possible). Then I went to the whitelist tab of the extension's settings, after that I whitelisted https://www.google.com/recaptcha/* & https://www.gstatic.com/recaptcha/* and finally I disabled Canvas fingerpriting protection and User-Agent randomiser in the `Applied

@unixfox
unixfox / haproxy.cfg
Created September 8, 2019 14:54
small haproxy tcp configuration file
global
user haproxy
group haproxy
daemon
defaults
mode tcp
balance leastconn
timeout client 30000ms
timeout server 30000ms
@unixfox
unixfox / nm-watcher.service
Last active October 3, 2019 09:12
Network Manager PPPoe connection watcher
[Unit]
Description=NetworkManager Watcher
Wants=NetworkManager-wait-online.service
After=NetworkManager-wait-online.service
[Service]
ExecStart=/usr/local/bin/nm-watcher
[Install]
WantedBy=multi-user.target
@unixfox
unixfox / azurewinipv6.json
Last active November 6, 2019 16:02
azure windows ipv6 template
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "The name of the administrator of the new VM. Exclusion list: 'admin','administrator'"
}
},