Skip to content

Instantly share code, notes, and snippets.

View shafiqsaaidin's full-sized avatar

Shafiq Saaidin shafiqsaaidin

View GitHub Profile
@tossmilestone
tossmilestone / v2ray-tp.sh
Last active December 30, 2024 09:12
V2ray transparent proxy for TCP
#!/bin/sh
install_v2ray(){
echo "Install v2ray..."
if [[ ! -f /usr/bin/v2ray/v2ray ]]
then
curl -Ls https://install.direct/go.sh | bash
fi
mkdir -p /etc/v2ray
@johnandersen777
johnandersen777 / WIREGUARD.md
Last active January 27, 2023 13:41
Wireguard Setup

How to use Wireguard

Wireguard is a VPN that comes built into Linux kernels >= 5.6 It also has clients for OSs like Windows, OSX, and Android.

If you're looking for how to have a virtual LAN party, Wireguard is a great way to do it. Since it's cross platform. You can even play Windows games on Linux using Lutris and network them with Wireguard to get Windows and Linux machines playing together.

@schwarzeni
schwarzeni / util.go
Last active February 24, 2025 02:57
[golang] get specific network interface's IPv4 address
package util
import (
"errors"
"fmt"
"net"
)
// useful links:
// https://stackoverflow.com/questions/27410764/dial-with-a-specific-address-interface-golang
# GLiNet MT300N-V2 安装 SSR plus 插件
GLiNet 是一家 生产 便携路由的国内厂商 好像外销为主。
最主要的是他家 路由系统采用的是开源 OpenWrt 系统 并在github 上开源 并提供sdk 和 很多插件
但是国内政策的关系 国内买到的路由器固件内 并没有提供直接安装 SS SSR V2ray 的方法。
经过在 恩三论坛 学习了下(www.right.com.cn) 已经成功把lean 开源的(https://github.com/coolsnowwolf/lede.git) SSR plus 插件 成功的安装到了 MT300N-V2 固件中,下面记录一些安装步骤。
@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active April 26, 2025 17:58
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@tautologico
tautologico / buildcrossgcc.sh
Last active April 17, 2025 11:56
Build gcc cross-compiler for armv7-a (Cortex-A)
#!/bin/sh
# Download binutils, gcc, the linux kernel, glibc
# define the prefix
export PREFIX=/opt/armhf
# change PATH to include the target directory
export PATH=$PREFIX/bin:$PATH
@ValdikSS
ValdikSS / huawei-e5885-backup.md
Last active August 4, 2024 13:35
How to backup current firmware on Huawei E5885

Huawei E5885 current firmware backup manual.

  1. Download modified usbloader, which will copy proper busybox into /system/busybox and enable telnetd on your device (will add additional line into /system/autorun.sh). Use it only on E5885, not on other device!
  2. Load it using balong-usbdload. Refer to this disassembling manual.
  3. After loading, wait about one minute, disconnect device from the computer and power off the device holding power button for ~15 seconds.
  4. Insert MicroSD card to the device and power it on.
  5. telnet 192.168.8.1 2323
/system/busybox sh
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@ValdikSS
ValdikSS / huawei-fw-list.txt
Last active April 7, 2025 15:28
Huawei firmware files found on update server
==========================================================================
DO NOT WRITE ANY QUESTIONS IN COMMENTS
==========================================================================
This is not appropriate place for discussions. Keep this list FW-only.
I do NOT have any firmware files apart from published here or on 4pda. Please do not contact me for firmware files requests.
This is a list of files found on Huawei update server by brute-forcing URL parameters.
Some firmware files have changelogs. Just change file name to "changelog.xml" in the end of the URL.
@mattia-beta
mattia-beta / ddos.conf
Last active April 24, 2025 06:22
IPtables DDoS Protection for VPS
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###