Skip to content

Instantly share code, notes, and snippets.

View celeron633's full-sized avatar
👻
defunct

celeron633 celeron633

👻
defunct
View GitHub Profile
#!/usr/bin/python3
import subprocess
import os
import sys
fwd_map = {8080: {8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 9090}, 443: {1443, 2443, 3443, 4443, 5443, 6443, 7443, 8443, 9443, 10443}}
ipt_template = 'iptables -t nat -A PREROUTING -p tcp --dport {} -j REDIRECT --to-port {}'
ipt_disable_template = 'iptables -t nat -D PREROUTING -p tcp --dport {} -j REDIRECT --to-port {}'
#!/usr/bin/python3
import subprocess
import os
import sys
https_port_to_disable = [443, 1443, 2443, 3443, 4443, 5443, 6443, 7443, 8443, 9443, 10443]
ipt_template = 'iptables -t filter -A INPUT -p tcp --dport {} -j DROP'
ipt_disable_template = 'iptables -t filter -D INPUT -p tcp --dport {} -j DROP'
@celeron633
celeron633 / config.json
Created April 27, 2024 02:12
singbox tproxy config
{
"log": {
"level": "warn",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "dns_proxy",
"address": "tcp://1.1.1.1",
@celeron633
celeron633 / vsftpd.conf
Created March 23, 2024 14:15
my vsftpd config
anonymous_enable=NO
local_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
@celeron633
celeron633 / test.py
Created January 20, 2024 01:50
pandas read xlsx with first row
import os
import pandas as pd
try:
sheet = pd.read_excel("test.xlsx", header=None)
except Exception as e:
print('read_excel failed')
exit(-1)
print(sheet.iloc[0,0])
@celeron633
celeron633 / smb.conf
Created January 1, 2024 05:43
new samba config for non-authentication share
[global]
server role = standalone server
workgroup = WORKGROUP
max log size = 1000
logging = file
security = user
map to guest = bad user
@celeron633
celeron633 / make.conf
Last active January 20, 2024 01:49
my gentoo make.conf for binary install
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
@celeron633
celeron633 / config.ymal
Created August 1, 2023 09:25
minimal clash cfg file for trojan
port: 7890 # port of HTTP
socks-port: 7891 # port of SOCKS5
allow-lan: false
mode: rule
proxies:
- name: "t1"
type: trojan
server: xx.com
@celeron633
celeron633 / v2ray-tproxy-v2.sh
Created April 1, 2023 03:57
iptables script for v2ray transparent proxy
#!/bin/bash
INTERFACE_NAME='ens18'
REDIR_PORT='1088'
# 开启代理
start()
{
echo "start tproxy begin"
@celeron633
celeron633 / 01-netcfg.yaml
Created March 26, 2023 13:58
01-netcfg.yaml for netplan
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
dhcp4: no
addresses: [192.168.31.2/24]
gateway4: 192.168.31.1