Skip to content

Instantly share code, notes, and snippets.

View symant233's full-sized avatar
🔬
Thinking...

怀瑾 symant233

🔬
Thinking...
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));
});
@symant233
symant233 / DragFlow.tsx
Last active January 15, 2026 14:08
DragFlow pure component, using grid layout and DOM draggable
import './index.less';
import React, { useRef } from 'react';
import cs from 'classnames';
export interface DragFlowProps<T> {
data: T[];
renderItem: (item: T, index?: number) => React.ReactNode;
/**
* `onSortEnd` 拖拽结束触发,将排序结果传入该函数
*/
general:
# Commands to run when the WM has started. This is useful for running a
# script or launching another application.
# Example: The below command launches Zebar.
startup_commands: []
# Commands to run just before the WM is shutdown.
# Example: The below command kills Zebar.
shutdown_commands: []
@symant233
symant233 / sunshine.sh
Last active January 27, 2026 06:51
sunshine ports forwarding
#!/bin/bash
# 设备 A 的 Tailscale IP
REMOTE_IP="100.100.120.233"
echo "------------------------------------------"
echo "🔍 正在通过 ifconfig 检测本地 IP..."
echo "------------------------------------------"
# 直接使用 ifconfig 过滤显示非本地和非 Tailscale 的 IP
@symant233
symant233 / rdp.sh
Created January 27, 2026 06:56
RDP protocol ports forwarding
#!/bin/bash
# ====================================================
# 配置区域
# ====================================================
# 目标电脑(被控端)的 IP 地址(如 Tailscale IP 或局域网 IP)
REMOTE_IP="100.100.120.233"
# RDP 默认端口
RDP_PORT=3389