a.k.a. what to do when your ISP starts blocking sites :(
Set the SOCKS proxy to local SSH tunnel
networksetup -setsocksfirewallproxy "Ethernet" localhost 8080
To clear the domain and port
It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)
Getting the PR code
Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37
Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:
$ git fetch upstream pull/37/head:pr37
| require 'net/http' | |
| require 'json' | |
| require 'uri' | |
| @token = '' | |
| def list_files | |
| ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
| params = { | |
| token: @token, |
| import requests | |
| import time | |
| import json | |
| token = '' | |
| #Delete files older than this: | |
| ts_to = int(time.time()) - 30 * 24 * 60 * 60 | |
| def list_files(): |
| #!/bin/bash | |
| # This file is designed to spin up a Wireguard VPN quickly and easily, | |
| # including configuring a recursive local DNS server using Unbound | |
| # | |
| # Make sure to change the public/private keys before running the script | |
| # Also change the IPs, IP ranges, and listening port if desired | |
| # iptables-persistent currently requires user input | |
| # add wireguard repo | |
| sudo add-apt-repository ppa:wireguard/wireguard -y |
| import threading | |
| class TestableThread(threading.Thread): | |
| """Wrapper around `threading.Thread` that propagates exceptions.""" | |
| def __init__(self, target, args): | |
| super().__init__(self, target=target, args=args) | |
| self.exc = None |