wg-docker/docker/firefox.sh
2022-11-28 21:38:36 +01:00

19 lines
560 B
Bash

#!/bin/bash
set -o allexport
source .env
set -o allexport
profile_path="$HOME/.mozilla/firefox"
env_path="$(echo $(ls $profile_path | grep $1))"
# ($env_path) && \
firefox -CreateProfile $1 ; firefox -P $1 &
cat << EOF >> $profile_path/$env_path/prefs.js
user_pref("network.proxy.socks", "localhost");
user_pref("network.proxy.socks_port", $SOCKS_PORT);
user_pref("network.proxy.socks_remote_dns", true);
user_pref("network.proxy.type", 1);
user_pref("network.trr.mode", 2);
user_pref("network.trr.uri", "https://mozilla.cloudflare-dns.com/dns-query");
EOF