fix(panel-proxy): route custom geo and http(s) Telegram through panelProxy
Custom geosite/geoip downloads built their own ssrfSafeTransport and never used the configured Panel Network Proxy, so geo updates failed on servers where GitHub is filtered. Route all custom-geo HTTP (startup probes + downloads) through panelProxy when set, falling back to the direct SSRF-guarded transport otherwise; the target URL stays SSRF-validated. The Telegram bot only honored a socks5:// panel proxy and silently rejected http(s)://, despite the setting advertising both. Branch the fasthttp dialer (FasthttpHTTPDialer for http(s), FasthttpSocksDialer for socks5) and accept all three schemes in the fallback and NewBot validation. Add tests proving the panel proxy is used by custom geo and that the bot dialer speaks HTTP CONNECT vs SOCKS5 per scheme.
This commit is contained in:
8 files changed
+245
-26
No files matched your search
@@ -162,7 +162,7 @@ export function createDefaultShadowsocksInboundSettings(
|
||||
return {
|
||||
method,
|
||||
password: seed.password ?? RandomUtil.randomShadowsocksPassword(method),
|
||||
network: seed.network ?? 'tcp',
|
||||
network: seed.network ?? 'tcp,udp',
|
||||
clients: [],
|
||||
ivCheck: seed.ivCheck ?? false,
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@ export type ShadowsocksClient = z.infer<typeof ShadowsocksClientSchema>;
|
||||
export const ShadowsocksInboundSettingsSchema = z.object({
|
||||
method: SSMethodSchema.default('2022-blake3-aes-256-gcm'),
|
||||
password: z.string().default(''),
|
||||
network: SSNetworkSchema.default('tcp'),
|
||||
network: SSNetworkSchema.default('tcp,udp'),
|
||||
clients: z.array(ShadowsocksClientSchema).default([]),
|
||||
ivCheck: z.boolean().default(false),
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ exports[`createDefault*InboundSettings factories > shadowsocks 1`] = `
|
||||
"clients": [],
|
||||
"ivCheck": false,
|
||||
"method": "2022-blake3-aes-256-gcm",
|
||||
"network": "tcp",
|
||||
"network": "tcp,udp",
|
||||
"password": "ZmFrZS1zcy1zZWVk",
|
||||
}
|
||||
`;
|
||||
|
||||
Loaded 3 of 8 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user