Install proxychains: sudo apt update && sudo apt install proxychains
Edit the configuration file: sudo nano /etc/proxychains.conf, add your SOCKS proxy address at the end of the file, for example: socks5 127.0.0.1 1080 (modify according to your proxy configuration)
Save and exit the editor (Ctrl+O, Enter, Ctrl+X).
Here is the sample code:
# proxychains.conf VER 3.1
# HTTP, SOCKS4, SOCKS5 tunneling proxifier with DNS.
# Enable silent mode - suppress detailed connection information output [1,6](@ref)
quiet_mode
# Proxy chaining mode [1,4](@ref)
# strict_chain requires all proxies to be online, dynamic_chain can skip failed proxies [1](@ref)
strict_chain
# Disable proxy DNS to avoid resolution issues [1](@ref)
# If you encounter DNS resolution issues, you can try uncommenting proxydns, but it is usually recommended to keep it commented [1](@ref)
# proxydns
# Timeout settings [1,4](@ref)
tcp_read_time_out 15000
tcp_connect_time_out 8000
# ProxyList format: type host port [user pass] [1,4](@ref)
[ProxyList]
# Configure each proxy in the format type ip port [user pass] on each line [1,4](@ref)
socks5 your IP port username password
Finally, execute the command: proxychains the script command you need to access, paste it afterwards.