fix: update workflow fixes

This commit is contained in:
fufsob committed 2026-10-06 05:04:50 +00:00
1 parent a435942b4f
commit 41d3575345
6 files changed
+92 -5

No files matched your search

+13
View File
@@ -242,6 +242,19 @@ class RenderInboundTests(unittest.TestCase):
with self.assertRaisesRegex(ValueError, "no server password"):
render_xray_inbound(multi_user_shadowsocks(serverPassword=None))
def test_shadowsocks_2022_key_of_wrong_length_is_rejected(self):
# 20 bytes for a 16-byte method: XRay would fail its whole start on it.
with tempfile.TemporaryDirectory() as tmp:
key_path = os.path.join(tmp, "password")
with open(key_path, "w", encoding="utf-8") as handle:
handle.write("dGhpcy1pcy1hLTE2Ynl0ZS1rZXk=\n")
with self.assertRaisesRegex(ValueError, "the ss key is not base64 of 16 bytes"):
render_xray_inbound(
listener(type="shadowsocks", users=[{"name": "ss", "password": None, "passwordFile": key_path}])
)
with self.assertRaisesRegex(ValueError, "the server key is not base64 of 16 bytes"):
render_xray_inbound(multi_user_shadowsocks(serverPassword="c2hvcnQ="))
def test_socks_accounts_and_udp(self):
ib = render_xray_inbound(
listener(type="socks", users=[{"name": "me", "password": "pw", "passwordFile": None}])