Skip to content

Instantly share code, notes, and snippets.

View seyrenus's full-sized avatar

Seyren seyrenus

  • china
View GitHub Profile
@phlinhng
phlinhng / a-clash-tproxy-gateway.md
Last active May 22, 2025 08:15
Clash as transparent proxy gateway via TPROXY

Notes

  1. If your local network use public IP ranges instead of private ones, make sure to add respecive RETURN rules to iptables to prevent looping issue
  2. Set clash as DHCP's only DNS server to allow domain-based filter (shunting) rules work
  3. Use lsof -i udp:53 to check if clash's DNS module work fine, otherwise you may have to kill systemd-resolved and any other processes occupying the UDP 53 port
  4. The given scripts will NOT hangle the traffic of gateway itself since it is not recommend to do so. If you want to redirect the egress traffic of the gateway, the following material may be useful

Reference

@tindy2013
tindy2013 / _subconverter_configs.md
Last active December 3, 2024 07:37
subconverter_configs

This is a gist repository for some external configs for subconverter, you can use the raw address of the following INIs to generate a specified set of rules, groups and/or scripts.

@lihongjie0209
lihongjie0209 / PoJoGen.groovy
Last active December 4, 2019 12:11
根据Jetbrain IDE 的数据库查询工具得到的结果生成Java Bean
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
@niltonvasques
niltonvasques / knockd_generator.sh
Created October 13, 2019 01:18
Generate knockd configuration file
#!/bin/bash
PINS=$1
HOSTNAME=$2
USERNAME=$3
PINDIPS=`shuf -i 1024-65534 -n $PINS`
OUTLOCK="knockd.conf"
# CHECK SYNTAX
@weibeld
weibeld / telegram-api.pdf
Last active April 20, 2025 22:08
Telegram CLI Commands
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gurland
gurland / main.py
Last active December 7, 2023 11:08
How to delete all your messages from chat in telegram? Easy, just use this program
# Copyright (c) 2017 Stanislav Bobokalo & Alexey Borontov
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
/**
* For Google Voice
* @Author zbinlin <[email protected]>
*/
var sleep = delay => new Promise(resolve => setTimeout(resolve, delay));
var composeClick = function x(btn) {
var rect = btn.getBoundingClientRect();
var x = rect.left + rect.width * Math.random();
var y = rect.top + rect.height * Math.random();
@RyanCCollins
RyanCCollins / iterm2-solarized.md
Created January 16, 2016 04:12 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@gnumoksha
gnumoksha / telegram-cli_example_usage.md
Last active December 5, 2021 14:24
Telegram-cli example usage

Install the required packages

apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev make git -y

Compile

cd /usr/src
git clone --recursive https://github.com/vysheng/tg.git