We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to establish a websocket connection through a proxy, the code is as follows:
let intents = GatewayIntents::MESSAGE_CONTENT | GatewayIntents::GUILD_MESSAGES | GatewayIntents::DIRECT_MESSAGES; let http = HttpBuilder::new(bot_token) .application_id(app_id) .proxy("http://localhost:7890") .map_or_else(|e| panic!("{}", e), |h| h.build()); let mut bot = ClientBuilder::new_with_http(http, intents) .event_handler(Handler) .await .expect("Build bot client failed"); bot.start() .await .expect("Bot connect success");
The error message is as follows:
Build bot client failed: Http(Request(reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("discord.com")), port: None, path: "/api/v10/gateway", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 110, kind: TimedOut, message: "Connection timed out" })) }))
PS: Strangely enough, websocket connections can be established normally using wscat (via http proxy)
wscat
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Unable to establish a websocket connection through a proxy, the code is as follows:
The error message is as follows:
PS: Strangely enough, websocket connections can be established normally using
wscat
(via http proxy)The text was updated successfully, but these errors were encountered: