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 April 15, 2024 19:21
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 July 4, 2024 21:53
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 / snappfood.js
Last active January 8, 2024 09:37
Snappfood Spent money
cookies = Object.fromEntries(document.cookie.split('; ').map(c => c.split('=')));
let UDID = cookies.UDID;
let jwt = cookies[['jwt-access_token']] ?? JSON.parse(window.localStorage.JWT ?? '{}').access_token;
var myHeaders = new Headers();
myHeaders.append("authority", "snappfood.ir");
myHeaders.append("accept", "application/json, text/plain, */*");
myHeaders.append("accept-language", "en-US,en;q=0.9,fa;q=0.8");
myHeaders.append("authorization", "Bearer " + jwt);
myHeaders.append("content-type", "application/x-www-form-urlencoded");
@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 \
@devops-school
devops-school / docker-volume-size-limit.txt
Created May 21, 2020 11:13
How to specify the size limit while creating the docker volume?
# docker -v
Docker version 19.03.9, build 9d988398e7
# docker volume create -h
Flag shorthand -h has been deprecated, please use --help
Usage: docker volume create [OPTIONS] [VOLUME]
Create a volume