Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
mkdir -p Configs ||true
python3 wg.py status |grep 'Client:' | while read a b c
do
python3 wg.py config $b | sed "s/b'//g; s/\\\\n/\n/g" > Configs/$c.conf
done
@Brramble
Brramble / wg.py
Created April 24, 2023 19:03
wireguard python API
import requests
import argparse
# Change this to your domain name or IP address of server running wg-easy
base_url = 'http://localhost:51821'
# Make sure to update the password to the password you set for your webgui
def get_session_id(base_url=base_url):
path = base_url + '/api/session'
headers = {'Content-Type': 'application/json'}
@UZziell
UZziell / warp4google.sh
Last active March 21, 2023 10:08
Install and setup warp on debian based distros. Only routes Google, AWS Cloudfront traffic through warp.
#!/usr/bin/env bash
WG_CONFIG_DIR="/etc/wireguard"
WG_CONFIG_FILE="/etc/wireguard/wg0.conf"
function print_ok() {
echo -e "\033[0;32m[OK] $1 \033[0m"
}
function print_error() {
#!/bin/bash
# sudo bash -c "$(wget -qO- https://gist.github.com/amircloner/586d79c0abc64d7c3fd12f3e619af249/raw)"
apt-get -y update
sudo apt-get -y remove docker docker-engine docker.io containerd runc
sudo apt-get -y update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
@alikarimii
alikarimii / wireguardOverWebsocket.md
Last active February 20, 2025 16:48
Set Up a Wireguard VPN Server with WebSocket Tunneling

این آموزش مربوط به سیستم های یونیکسه.

CDN

خب اول یک دامنه یا ساب دامنه انتخاب کنید و یک A رکورد به مقدار آی پی سرور خارجی و پرت HTTPS بسازید.سی دی ان داخلی باشه که طرح رذالتو دور بزنید. باید روی SSL,CDN رو فعال کنید.

SSL

خب برای اون دامنه باید اس اس ال داشته باشید با این فایل ها fullchain.pem, privkey.pem, chain.pem, dhparam.pem آموزش گرفتن اس اس ال هم که زیاده. (dhparam- Diffie–Hellman (D-H))

NGINX

اول nginx رو روی سرور خارجی نصب کنید.

@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active June 29, 2025 23:45
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

پنل x-ui

پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور

mkdir x-ui && cd x-ui
docker run -itd --network=host \
    -v $PWD/db/:/etc/x-ui/ \
 -v $PWD/cert/:/root/cert/ \
@SamadiPour
SamadiPour / console_easy_excute.js
Last active August 12, 2025 06:21
Snappfood Spent money
// Copy paste this line in your browser console to run the script and get the result
fetch('https://gist.githubusercontent.com/SamadiPour/a18b1e186deac76c4a95fa108d02a6ea/raw/snappfood_enhanced.js').then(r => r.text()).then(code => eval(code));
@hossainemruz
hossainemruz / k8s-prepare-node.sh
Created June 15, 2022 12:20
Bash script to automatically install and configure container runtime, cni plugins etc
#!/bin/bash
set -eou pipefail
#========== Step 1: Disable Swap ============
echo "Disabling Swap......."
sudo swapoff -a
sudo sed -i '/^[^#]/ s/\(^.*swap.*$\)/#\1/' /etc/fstab
free -h
echo ""
@mahmoud-eskandari
mahmoud-eskandari / docker-compose.yml
Created February 8, 2022 09:31
squid-authenticated Docker / Telegram mtproto
version: '3.8'
services:
sq:
image: robhaswell/squid-authenticated
restart: always
ports:
- "3128:3128"
environment:
- "SQUID_USERNAME=user"
- "SQUID_PASSWORD=pass..."
#!/bin/bash
# wget https://gist.github.com/amircloner/f1295ff5669728e21d7babca68bf3d4f/raw -O caprover-install.sh && chmod +x caprover-install.sh && ./caprover-install.sh
# sudo bash -c "$(wget -qO- https://gist.github.com/amircloner/f1295ff5669728e21d7babca68bf3d4f/raw)"
apt-get -y update
sudo apt-get -y remove docker docker-engine docker.io containerd runc
sudo apt-get -y update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \