Files
hamkadr/deploy/xray/config.json
T
soroush.asadi cea27c8684
CI/CD / CI · dotnet build (push) Successful in 53s
CI/CD / Deploy · hamkadr (push) Successful in 1m12s
[Ingest] Route scraping through an optional V2Ray/Xray proxy (Telegram in Iran)
Telegram and some sources are filtered in Iran. .NET cannot speak vmess/vless/trojan, so add an Xray sidecar (compose service 'xray', behind the 'proxy' profile) that converts the admin's config into a local SOCKS5 proxy (xray:10808). New ScrapeHttpClients provider builds a proxied or direct HttpClient (WebProxy supports socks5/socks4/http) cached per proxy URL; all five ingestion sources (Telegram/Bale/Divar/Medjobs/Websites) now use it. Admin settings gain IngestProxyEnabled + IngestProxyUrl (migration; UI under sources). Added deploy/xray/config.json template + README with vmess/vless/trojan examples.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 17:53:17 +03:30

54 lines
1.3 KiB
JSON

{
"log": { "loglevel": "warning" },
"inbounds": [
{
"tag": "socks-in",
"listen": "0.0.0.0",
"port": 10808,
"protocol": "socks",
"settings": { "udp": true, "auth": "noauth" }
},
{
"tag": "http-in",
"listen": "0.0.0.0",
"port": 10809,
"protocol": "http"
}
],
"outbounds": [
{
"//": "REPLACE this whole outbound with YOUR vmess / vless / trojan config.",
"//vmess-example": "see deploy/xray/README.md for vmess & trojan templates",
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "YOUR_SERVER_ADDRESS",
"port": 443,
"users": [
{
"id": "YOUR_UUID",
"encryption": "none",
"flow": ""
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": { "serverName": "YOUR_SNI" },
"wsSettings": { "path": "/", "headers": { "Host": "YOUR_SNI" } }
}
},
{ "tag": "direct", "protocol": "freedom" }
],
"routing": {
"rules": [
{ "type": "field", "inboundTag": ["socks-in", "http-in"], "outboundTag": "proxy" }
]
}
}