Since WARP was blocked, we have been unable to access pure IPv6 servers, and we cannot connect to serv00 via SSH after it was blocked. To solve these problems, we can deploy a WebSSH.
First, fork this repository: huashengdun-webssh
Next, modify the webssh/settings.py
file and add utf-8
after default
to prevent Chinese garbled characters in the code output.
define('encoding', default='utf-8',
help='''The default character encoding of ssh servers.
Example: --encoding='utf-8' to solve the problem with some switches&routers''')
define('version', type=bool, help='Show version information',
callback=print_version)
Deploying on Koyeb#
Select the forked repository and adjust the region to Washington, D.C.
Replace the Run command with:
python run.py --xsrf=False --xheaders=False --origin='*' --debug --delay=6
Change the port to 8888
and click on Deploy.
Using Cloudflare Workers for Reverse Proxy#
Replace app.koyeb.com
in the code with the domain provided by Koyeb.
addEventListener('fetch', (event) => {
event.respondWith(handleRequest(event.request));
});
async function handleRequest(request) {
let url = new URL(request.url);
// Replace "app.koyeb.com" with your Koyeb app domain
const targetHostname = 'app.koyeb.com';
const workerHostname = request.headers.get('host');
if (url.hostname === workerHostname) {
url.hostname = targetHostname;
let newRequest = new Request(url, request);
return fetch(newRequest);
} else {
return new Response('Not Found', { status: 404 });
}
}