version: "3"
services:
traefik:
image: "traefik:v2.10"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=MYEMAIL@gmail.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
# - "8080:8080"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
private_network:
ipv4_address: 10.2.0.120
unbound:
image: "mvance/unbound:1.17.0"
container_name: unbound
restart: unless-stopped
hostname: "unbound"
volumes:
- "./unbound:/opt/unbound/etc/unbound/"
networks:
private_network:
ipv4_address: 10.2.0.200
wg-easy:
depends_on: [unbound, adguardhome]
environment:
- WG_HOST=MYHOST_IP
- PASSWORD=openode
- WG_PORT=51820
- WG_DEFAULT_ADDRESS=10.10.10.x
- WG_DEFAULT_DNS=10.2.0.100
- WG_ALLOWED_IPS=10.2.0.0/24, 0.0.0.0/0, ::/0
- WG_PERSISTENT_KEEPALIVE=25
- WG_MTU=1280
#image: ditek/wg-easy
image: weejewel/wg-easy
container_name: wg-easy
volumes:
- .:/etc/wireguard
ports:
- "51820:51820/udp"
# - "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
dns:
- 10.2.0.100
- 10.2.0.200
networks:
private_network:
ipv4_address: 10.2.0.3
labels:
- "traefik.enable=true"
- "traefik.http.routers.vpn.rule=Host(`vpn.site.com`)"
- "traefik.http.routers.vpn.entrypoints=websecure"
- 'traefik.http.routers.vpn.tls=true'
- "traefik.http.routers.vpn.tls.certresolver=myresolver"
- "traefik.http.services.vpn.loadbalancer.server.port=51821"
adguardhome:
depends_on: [unbound]
image: adguard/adguardhome
container_name: adguardhome
restart: unless-stopped
environment:
- TZ=America/Los_Angeles
volumes:
- ./work:/opt/adguardhome/work
- ./conf:/opt/adguardhome/conf
networks:
private_network:
ipv4_address: 10.2.0.100
networks:
private_network:
ipam:
driver: default
config:
- subnet: 10.2.0.0/24
import telebot
import pandas as pd
TOKEN = '972378863:AAEq29oLt61234sdfsdf3pQ1tXRpzmM'
bot = telebot.TeleBot(TOKEN)
@bot.message_handler(content_types=['photo'])
def handle_photo(message):
file_id = message.photo[-1].file_id
for chat_id in chats_ids:
bot.send_photo(chat_id, file_id)
@bot.message_handler(content_types=['document'])
def handle_document(message):
file_id = message.document.file_id
for chat_id in chats_ids:
bot.send_document(chat_id, file_id)
file_data = pd.read_excel('./tgid.xlsx')
# Читаем id из колонки chat_id
chats_ids = file_data['chat_id'].tolist()
bot.polling()
что IP сервера не загрязняет домен,
Необходимо их различать.
1500 - допустим внутренний номер оператора
*220 - номер по которому операторы меняют свое имя каждое утро, можно добавить проверку что бы они не забывали это делать.
[app-register-operator]
exten => _*220,1,Answer
same => n,Noop(-------app-register-operator----)
same => n,Set(MYPIN=NOPIN)
same => n,Read(${MYPIN},enterPin,,,4,15)
same => n,Goto(go-${MYPIN})
same => n(go-2232,Noop(------register-ping-${MYPIN}------)
same => n,Set(DB(AOPERATOR/1500)="Operator1")
same => n,HangUP()
same => n(go-3321),Noop(------register-ping-${MYPIN}------)
same => n,Set(DB(AOPERATOR/1500)="Operator2")
same => n,HangUP()
same => n(go-NOPIN),Noop(------register-ping-${MYPIN}------)
same => n,Set(DB(AOPERATOR/1500)="NotSet")
same => n,HangUP()
[dial]
exten => _X.,1,Noop(----Internal-Call----)
same => n,GotoIf($[${DB(AOPERATOR/${CALLERID(num)})}= NotSet]?:go-notset)
same => n,Set(CDR(userfield)=${DB(AOPERATOR/${CALLERID(num)})}) ;; добавляем в CDR имя в специальное поле в DB cdr, или любое другое поле
same => n,Dial(SIP/${EXTEN})
same => n,HangUp()
same => n(go-notset),PlayBack(phoneNotRegister_PleaseRegisterBeforeCall)
same => n,HangUp()
Добавить задание в крон которое будет скидывать значение после работы
asterisk -rx "database put AOPERATOR 1500 NotSet"
свой exchange или подписка
azure ad как услуга
сервер в интернете нужен лишь чтобы себе компанию найти, а дальше хостем выступает один игрок.
Те знать время прохождения до того ка взял сервер практически невозможно.