All Projects → zjx20 → socks-cli

zjx20 / socks-cli

Licence: other
A solution to make CLI commands use socks5 proxy.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to socks-cli

Php Whois
PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 5.4+ and 7+ compatible
Stars: ✭ 179 (+272.92%)
Mutual labels:  curl, socks5
Node.js-API-Masterclass-With-Express-MongoDB
[Brad Traversy] Node.js API Masterclass With Express & MongoDB [ENG, 2019]
Stars: ✭ 16 (-66.67%)
Mutual labels:  curl
Wttr.in
⛅ The right way to check the weather
Stars: ✭ 16,345 (+33952.08%)
Mutual labels:  curl
httpproxy
一个轻量级HTTP代理,支持shadowsocks服务,方便命令行、开发环境使用。
Stars: ✭ 90 (+87.5%)
Mutual labels:  curl
Websocat
Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
Stars: ✭ 3,477 (+7143.75%)
Mutual labels:  curl
yellowsocks
transparent TCP to SOCKS5 redirector
Stars: ✭ 30 (-37.5%)
Mutual labels:  socks5
Notica
Send browser notifications from your terminal. No installation. No registration.
Stars: ✭ 215 (+347.92%)
Mutual labels:  curl
plz.el
An HTTP library for Emacs
Stars: ✭ 113 (+135.42%)
Mutual labels:  curl
sx
🖖 Fast, modern, easy-to-use network scanner
Stars: ✭ 1,267 (+2539.58%)
Mutual labels:  socks5
spp
A simple and powerful proxy
Stars: ✭ 575 (+1097.92%)
Mutual labels:  socks5
into-curl
Print clj-http as a curl.
Stars: ✭ 17 (-64.58%)
Mutual labels:  curl
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+110425%)
Mutual labels:  curl
docker-windscribe-socks-server
Containerizes a SOCKS5 proxy server with traffic tunneled through Windscribe's VPN service
Stars: ✭ 28 (-41.67%)
Mutual labels:  socks5
Covid19 Tracker Cli
A curl-based command line tracker for Novel Coronavirus or COVID-19 pandemic. It Supports terminal for linux and macos, command prompt for windows, and termux for android with real-time updates.
Stars: ✭ 244 (+408.33%)
Mutual labels:  curl
onionfruit
OnionFruit™ Connect - Tor access client with country selection, bridge configuration, pluggable transports and experimental DNS support
Stars: ✭ 150 (+212.5%)
Mutual labels:  socks5
Parrot.live
🐦 Bringing animated parrots to terminals everywhere
Stars: ✭ 2,642 (+5404.17%)
Mutual labels:  curl
TF2DeepFloorplan
TF2 Deep FloorPlan Recognition using a Multi-task Network with Room-boundary-Guided Attention. Enable tensorboard, quantization, flask, tflite, docker, github actions and google colab.
Stars: ✭ 98 (+104.17%)
Mutual labels:  curl
socks5
(支持UDP和TCP的纯Go/Golang socks5服务器) socks5 proxy server builds with go/golang, which UDP and TCP are supported.
Stars: ✭ 107 (+122.92%)
Mutual labels:  socks5
flysystem-curlftp
Flysystem Adapter for the FTP with cURL implementation
Stars: ✭ 36 (-25%)
Mutual labels:  curl
pegasocks
A lightweight proxy client written in C, intends to support multiple protocols(trojan etc.)
Stars: ✭ 112 (+133.33%)
Mutual labels:  socks5

socks-cli

socks-cli is a solution to make CLI commands use the specified socks5 proxy, by setting up special environment variables, such as ALL_PROXY. It works on linux and macOS with bash and python installed.

Here is an incomplete list of supported commands:

  • git
  • curl
  • wget
  • brew
  • pod
  • gem
  • npm
  • mvn
  • ssh
  • ...

Usage

  1. Clone the code.

    git clone https://github.com/zjx20/socks-cli.git
  2. Copy socksproxyenv.sample to socksproxyenv, and fill your socks5 server into it.

    cd socks-cli
    cp socksproxyenv.sample socksproxyenv
    
    # edit socksproxyenv, complete the line:
    #   export SOCKS_PROXY=
  3. Invoke source socks-cli/activate before running your CLI commands:

    $ source socks-cli/activate
    Serving HTTP proxy on 127.0.0.1 port 54967 ...
    Done! Variables or aliases have been changed to:
      GIT_PROXY_COMMAND=/Users/x/socks-git/sh/socksified-connect.sh
      GIT_SSH=/Users/x/socks-git/sh/socksified-ssh.sh
      ALL_PROXY=socks5h://127.0.0.1:1080
      HTTP_PROXY=http://127.0.0.1:54967
      HTTPS_PROXY=http://127.0.0.1:54967
    
    # Following commands will use the socks proxy!
    
    $ git clone [email protected]:git/git.git
    Cloning into 'git'...
    remote: Counting objects: 213208, done.
    remote: Compressing objects: 100% (372/372), done.
    Receiving objects 2.0% (1/213208), 620.00 KiB | 121.00 KiB/s
    ...
    
    # Check your external IP!
    $ curl ipinfo.io
    ...
  4. Optionally, you can invoke source socks-cli/deactivate to deactivate socks-cli.

For more details, please see socksproxyenv.sample.

One-Shot Mode

The usage described above affects all commands in the terminal session. If you wish to temporarily enable the socks proxy for only a particular command, you can use the socksify script. (Note: You still need to configure the socksproxyenv file first.)

# make a symlink to PATH
ln -s /path/to/socks-cli/socksify /usr/local/bin/socksify

# or make an alias
alias socksify='/path/to/socks-cli/socksify'

# enable for one-shot
socksify curl ipinfo.io
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].