TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
9.28k stars 724 forks source link

The way of adding socks5 proxy #189

Closed dondonw1 closed 1 year ago

dondonw1 commented 1 year ago

In case it is useful for somebody, socks5 proxy can be added by this way:

Edit client.py: ~/.local/lib/python3.x/site-packages/sgpt$ nano client.py

By adding below code:

import socks import socket

Define the proxy server URL and port number

proxy_host = '' proxy_port = proxy_username = '' proxy_password = ''

Set up the SOCKS5 proxy with authentication

socks.set_default_proxy(socks.SOCKS5, proxy_host, proxy_port, username=proxy_username, password=proxy_password) socket.socket = socks.socksocket

TheR1D commented 1 year ago

Thanks, added this to wiki page

dustookk commented 1 year ago

doesn't work. I had to set export https_proxy=socks5://ip:prot in ~/.bashrc

marcoleder commented 5 months ago

How is this done in the new version? I saw that client.py got removed with PR https://github.com/TheR1D/shell_gpt/pull/414 and the export https_proxy=socks5://ip:port does not work for me...