پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور
mkdir x-ui && cd x-ui
docker run -itd --network=host \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
#!/bin/bash | |
# Written by Mahmoud Eskandari @ BoomerangApp - 2024 | |
# Warning: Backup your innoDB before run! | |
# ****** Caution ****** | |
# If you mistakenly swap the source and destination, | |
# the source database will be deleted. This script will also delete and recreate the destination database. | |
# Please be careful. | |
# |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"math" | |
"net/http" | |
"os" | |
"path" |
version: '3.8' | |
services: | |
sq: | |
image: robhaswell/squid-authenticated | |
restart: always | |
ports: | |
- "3128:3128" | |
environment: | |
- "SQUID_USERNAME=user" | |
- "SQUID_PASSWORD=pass..." |
TIMESTAMP(DATE_SUB(CURDATE(),INTERVAL | |
CASE weekday(CURDATE()) | |
WHEN 0 THEN 2 | |
WHEN 1 THEN 3 | |
WHEN 2 THEN 4 | |
WHEN 3 THEN 5 | |
WHEN 4 THEN 6 | |
WHEN 5 THEN 0 | |
WHEN 6 THEN 1 | |
END |
{ | |
"application/andrew-inset": [ | |
"ez" | |
], | |
"application/applixware": [ | |
"aw" | |
], | |
"application/atom+xml": [ | |
"atom" | |
], |
sudo -i | |
# example sda | |
lsblk >> get list of partitions | |
fdisk /dev/sda | |
>> New Partition | |
n |
${LOCAL_ADDR IP:PORT}
یعنی سرور ایرانتون و پورت داخلی که میخواهید روش ساکس داشته باشید و باید با این جایگزین بشود.
مثال:
10.10.10.10:9090
و قسمت پایین هم یوزر سرور خارجتون و آدرس IP سرور خارجیتونه که باید جایگزین کنید تو خط 7 فایل ssh-tunnel-as-systemd.sh
func EvalStr(str string, input map[string]string) string { | |
for key := range input { | |
re := regexp.MustCompile(`(?mU)\[` + key + `\](.*)\[/` + key + `\]`) | |
for _, match := range re.FindAllString(str, -1) { | |
if len(input[key]) > 0 { | |
inner := strings.Replace(match, `[`+key+`]`, "", -1) | |
inner = strings.Replace(inner, `[/`+key+`]`, "", -1) | |
str = strings.Replace(str, match, inner, -1) | |
} else { | |
str = strings.Replace(str, match, "", 1) |
function flattenMap(itemList, key) { | |
return itemList.flatMap(item => { | |
if (typeof item[key] === 'undefined' || item[key].length === 0) { | |
return item; | |
} | |
let childs = item[key]; | |
delete item[key]; | |
return [item, ...flattenMap(childs, key)]; | |
}); | |
} |