-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
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
[gh-2406] support rpc requests via proxies. #2462
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
547ebec
to
32440df
Compare
crates/rooch-rpc-client/src/lib.rs
Outdated
http: http_client.clone(), | ||
rooch: RoochRpcClient::new(http_client.clone()), | ||
reqwest: reqwest_client, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should find method to add proxy to HTTP client and replace the HTTP client in RoochRpcClient, not add a new client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should find method to add proxy to HTTP client and replace the HTTP client in RoochRpcClient, not add a new client.
From my research, the HTTP client doesn't support proxied request. However, I'll find a way to add a proxy to the http client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I could find so far, the JsonRpsee
lib only supports socks5
proxy, meaning that there's no way to connect with https_proxy
or all_proxy
through using only the JsonRpsee
lib. I'm sorry for that.
@@ -18,14 +18,23 @@ pub struct AddCommand { | |||
pub rpc: String, | |||
#[clap(long, value_hint = ValueHint::Url)] | |||
pub ws: Option<String>, | |||
#[clap(long, value_hint = ValueHint::Url)] | |||
pub proxy: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proxy is global, not a configuration option for Rooch Env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proxy is global, not a configuration option for Rooch Env.
I think it should and shall be distinguished from the global proxy for each specific application. Global proxy in the system and the proxy in the application are two different elements and they should not be deemed as one.
I leave this issue untouched. |
Summary
Support
proxy
env in rooch config files.Closes [CLI] support https_proxy,all_proxy env to request RPC #2406