zhangjh / gemini_sdk

Google gemini api's java implement
16 stars 2 forks source link

how to add proxy? #2

Closed PassiveIncomeMachine closed 6 months ago

PassiveIncomeMachine commented 6 months ago

how to add proxy? thx

zhangjh commented 6 months ago

It's another topic, you can look at the docs about v2ray here. You can also use this shell script to set up v2ray quickly and conveniently. Once you set up your v2ray service, you can set the proxy enviroment variable by using the command like this: export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;export ALL_PROXY=socks5://127.0.0.1:1080;

zhangjh commented 4 months ago

I have already support adding local proxy in this sdk project. Look at the code: me.zhangjh.gemini.util.HttpClientUtil image