使用电视/袜子躲在代理后面

发布于 2025-02-04 18:51:38 字数 508 浏览 3 评论 0原文

当我使用这些凭据和IP地址签名时,我的手机上的电报检测我的真实IP。我尝试了GitHub Telethon上的封闭问题,因此代理服务器似乎运行良好,因为我运行了NMAP扫描并使用CLI进行了ping

from telethon.sync import TelegramClient, events

api_id = ''
api_hash = ''

with TelegramClient('Socheen', api_id, api_hash, proxy = {
    'proxy_type': 'socks5', 
    'addr': '208.102.51.6',      
    'port': 58208,
    'rdns': True
}) as client:
    client.send_message('me', 'Hello, myself!')
    client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))

When i sign in using these credentials and ip address, telegram on my cell phone detects my real ip. I tried closed issues on github telethon, the proxy server seems to be running fine since i ran nmap scan as well as pinged it using CLI

from telethon.sync import TelegramClient, events

api_id = ''
api_hash = ''

with TelegramClient('Socheen', api_id, api_hash, proxy = {
    'proxy_type': 'socks5', 
    'addr': '208.102.51.6',      
    'port': 58208,
    'rdns': True
}) as client:
    client.send_message('me', 'Hello, myself!')
    client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

日记撕了你也走了 2025-02-11 18:51:38

您应该使用其他语法进行代理:

from telethon.sync import TelegramClient, events
import socks

api_id = ''
api_hash = ''

with TelegramClient('Socheen', api_id, api_hash, proxy = (socks.HTTP, 'x.x.x.x', 4444, True) as client:
    client.send_message('me', 'Hello, myself!')
    client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))

我没有使用Sock5代理,但是我使用了HTTP/HTTPS代理,它们工作正常。

(Proxy Type, IP, Port, rdns)

You should use a different syntax for the proxy:

from telethon.sync import TelegramClient, events
import socks

api_id = ''
api_hash = ''

with TelegramClient('Socheen', api_id, api_hash, proxy = (socks.HTTP, 'x.x.x.x', 4444, True) as client:
    client.send_message('me', 'Hello, myself!')
    client.loop.run_until_complete(client.send_message('me', 'Hello, myself!'))

I haven't used Sock5 proxies but I've used HTTP/HTTPS proxies and they work fine.

(Proxy Type, IP, Port, rdns)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文