@BGP_Channel · Post #5031 · 07.04.2021 г., 15:15
#liying#BGP CNGZ-QCloud #SS#Trojan#XTLS 官网 liyingcloud.org 群组 @liyingcloud 频道 @liyingyun Twitter: https://s.4a.hk/CJU9Z1L
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #242 · 7 мај
Теперь запакуем строку. В этом случае следует передавать тип данных bytes. >>> struct.pack('=s', b'a') b'a' Для записи слова следует указывать количество символов. >>> struct.pack('=5s', b'hello') b'hello' Кстати, запакованный вид соответствует исходному тексту. Всё верно, символ есть в таблице ASCII, то есть его код попадает в диапазон 0-127, он может быть записан одним байтом и имеет визуальное представление. А вот что будет если добавить символ вне ASCII >>> struct.pack(f'=s', b'ё') SyntaxError: bytes can only contain ASCII literal characters. Ошибка возникла еще на этапе создания объекта bytes, который не может содержать такой символ. Поэтому надо кодировать эти байты из строки. >>> enc = 'ёжик'.encode('utf-8') >>> struct.pack(f'={len(enc)}s', enc) b'\xd1\x91\xd0\xb6\xd0\xb8\xd0\xba' Заметьте, длина такой строки в байтах отличается от исходной длины, так как символы вне ASCII записываются двумя байтами и более. Поэтому здесь формат создаём на лету, используя получившуюся длину как каунтер токена. #libs#basic
Пребарај: #xtls
@BGP_Channel · Post #5031 · 07.04.2021 г., 15:15
#liying#BGP CNGZ-QCloud #SS#Trojan#XTLS 官网 liyingcloud.org 群组 @liyingcloud 频道 @liyingyun Twitter: https://s.4a.hk/CJU9Z1L
@BGP_Channel · Post #5077 · 24.04.2021 г., 15:47
#liying#Trojan#SS#XTLS#BGP CNGZ-QCloud #VPN 仅测速腾讯云+阿里云入口节点 @liyingyun
@BGP_Channel · Post #5005 · 30.03.2021 г., 15:08
#liying#BGP CNGZ-QCloud #SS#Trojan#XTLS#VPN 官网 liyingcloud.org 频道 @liyingyun 群组 @liyingcloud Twitter: https://s.4a.hk/bVmb3mI
@BGP_Channel · Post #5046 · 12.04.2021 г., 15:52
#liying#BGP CNSH-QCloud #SS#Vmess#Trojan#XTLS#VPN 频道 @liyingyun 群组 @liyingcloud 官网 liyingcloud.org
@BGP_Channel · Post #5094 · 29.04.2021 г., 16:47
#liying#南方#电信#Trojan#SS#XTLS#v2ray 500M
@githubtrending · Post #14723 · 19.05.2025 г., 13:00
#go#anticensorship#dns#network#proxy#reality#shadowsocks#socks5#tls#trojan#tunnel#utls#vision#vless#vmess#vpn#wireguard#xhttp#xray#xtls#xudp Project X offers powerful network tools like Xray-core and REALITY, built on the efficient XTLS protocol that improves speed and security by reducing unnecessary encryption. It features advanced routing and fallback systems to keep your internet traffic safe and uninterrupted, ideal for streaming or video calls. The project is open-source under Mozilla Public License 2.0, encouraging community contributions to keep it evolving. You can easily install it on various platforms using official scripts, Docker, or one-click setups, and use many supported GUI clients on Windows, Linux, Android, iOS, and routers. This flexibility and strong security help you optimize and protect your network experience. https://github.com/XTLS/Xray-core