TGViewer
Ох уж эти айтишники Ох уж эти айтишники @ohueit · 9 subscribers
Post #39 179
Это более защищенная версия прокси сразу:
#
# Run on debian 13
#
apt update
apt install golang -y
cd /tmp
go install github.com/9seconds/mtg/v2@latest
cp ~/go/bin/mtg /bin/mtg

cat <<EOF >/etc/mtg.toml
# https://github.com/9seconds/mtg/blob/master/example.config.toml
debug = false
secret = "$(mtg generate-secret --hex google.com)"
bind-to = "0.0.0.0:8443"
concurrency = 16384
prefer-ip = "prefer-ipv4"
auto-update = true
tolerate-time-skewness = "5s"
allow-fallback-on-unknown-dc = false
[domain-fronting]
port = 443
proxy-protocol = false
[network]
dns = "https://1.1.1.1"
proxies = []
[network.timeout]
tcp = "5s"
http = "10s"
idle = "5m"
handshake = "10s"
tcp-not-sent-lowat = "128kib"
[network.keep-alive]
disabled = false
idle = "15s"
interval = "15s"
count = 9
[defense.doppelganger]
urls = [ "https://www.google.com/", "https://www.gstatic.com/generate_204", "https://storage.googleapis.com/" ]
repeats-per-raid = 10
raid-each = "6h"
drs = false
[defense.anti-replay]
enabled = true
max-size = "8mib"
error-rate = 0.001
[defense.blocklist]
enabled = true
download-concurrency = 2
urls = [ "https://iplists.firehol.org/files/firehol_level1.netset" ]
update-each = "24h"
[defense.allowlist]
enabled = false
download-concurrency = 2
urls = []
update-each = "24h"
[stats.statsd]
enabled = false
address = "127.0.0.1:8125"
metric-prefix = "mtg"
tag-format = "datadog"
[stats.prometheus]
enabled = false
bind-to = "127.0.0.1:3129"
http-path = "/metrics"
metric-prefix = "mtg"
EOF


cat <<EOF > /etc/systemd/system/mtg.service
[Unit]
Description=mtg - MTProto proxy server
Documentation=https://github.com/9seconds/mtg
After=network.target

[Service]
ExecStart=/bin/mtg run /etc/mtg.toml
Restart=always
RestartSec=3
DynamicUser=true
LimitNOFILE=65536
AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable mtg
systemctl start mtg
cat /etc/mtg.toml

Проблема только в том, что в России её бесполезно поднимать. Она ломится к серверам ТГ, что сразу попадает в бан. Так что используем старый добрый tcppm
More from @ohueit
  1. Jun 11, 2026инструкция скорее для себя, чтобы не забыть, как делается: буквально вставляем в консоль в…
  2. May 19, 2026Итак, давайте попробуем подключить себе IPTV бесплатно и без смс. Я не смотрю ничего, кром…
  3. May 15, 2026Тестировалось на Orange Pi Zero 3 1GB. одним хвостом подключаем в локалку, а на WiFi подкл…
  4. Apr 20, 2026photo post
  5. Apr 20, 2026photo post
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →