Skip to content

Instantly share code, notes, and snippets.

View symant233's full-sized avatar
๐Ÿ

ๆ€€็‘พ symant233

๐Ÿ
View GitHub Profile
@symant233
symant233 / nginx-webp-sample.conf
Created November 3, 2023 12:09 — forked from uhop/nginx-webp-sample.conf
Serving WEBP with nginx conditionally.
user www-data;
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
@symant233
symant233 / socks5.js
Created November 5, 2023 06:44 — forked from longbill/socks5.js
Socks5 proxy server in pure javascript
const net = require('net')
net.createServer(client => {
client.once('data', data => {
client.write(Buffer.from([5, 0]));
client.once('data', data => {
data = [...data];
let ver = data.shift();
let cmd = data.shift(); //1: connect, 2: bind, 3: udp
let rsv = data.shift();
@symant233
symant233 / ex.worker.js
Created September 13, 2024 08:57
cf-proxy-ex modification
addEventListener('fetch', (event) => {
const url = new URL(event.request.url);
thisProxyServerUrlHttps = `${url.protocol}//${url.hostname}/`;
thisProxyServerUrl_hostOnly = url.host;
//console.log(thisProxyServerUrlHttps);
//console.log(thisProxyServerUrl_hostOnly);
event.respondWith(handleRequest(event.request));
});