Skip to content

Instantly share code, notes, and snippets.

@scalaview
Last active March 15, 2025 13:08
Show Gist options
  • Save scalaview/4417d7be2d248078522b21ff6f6890d2 to your computer and use it in GitHub Desktop.
Save scalaview/4417d7be2d248078522b21ff6f6890d2 to your computer and use it in GitHub Desktop.

Revisions

  1. scalaview revised this gist Oct 23, 2018. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion polipo.sh
    Original file line number Diff line number Diff line change
    @@ -36,4 +36,8 @@ This config is great for SquidMan app.

    Delete proxy settings
    $ npm config delete http-proxy
    $ npm config delete https-proxy
    $ npm config delete https-proxy



    alias lpiv="ssh -i $HOME/.ssh/developer.pem [email protected] -o 'ProxyCommand=nc -X connect -x 127.0.0.1:8123 %h %p' -t 'cd /var/www/livingsmartapi/current; bash -l'"
  2. scalaview revised this gist Jul 20, 2018. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion polipo.sh
    Original file line number Diff line number Diff line change
    @@ -26,4 +26,14 @@ import socket
    socks.set_default_proxy(socks.SOCKS5, "localhost", 1086)
    socket.socket = socks.socksocket
    ```
    ```


    Write proxy settings
    $ npm config set proxy http://localhost:3128
    $ npm config set https-proxy http://localhost:3128
    This config is great for SquidMan app.

    Delete proxy settings
    $ npm config delete http-proxy
    $ npm config delete https-proxy
  3. scalaview revised this gist Jun 28, 2018. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions polipo.sh
    Original file line number Diff line number Diff line change
    @@ -20,3 +20,10 @@ git xxx
    git config --global --unset-all http.proxy


    ```python
    import socks
    import socket
    socks.set_default_proxy(socks.SOCKS5, "localhost", 1086)
    socket.socket = socks.socksocket
    ```
  4. scalaview created this gist Dec 8, 2017.
    22 changes: 22 additions & 0 deletions polipo.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    First run polipo with parent proxy set to Shadowsocks:

    apt-get install polipo
    service polipo stop
    polipo socksParentProxy=localhost:1080


    Then you can play with the HTTP proxy:

    http_proxy=http://localhost:8123 apt-get update

    http_proxy=http://localhost:8123 curl www.google.com

    http_proxy=http://localhost:8123 wget www.google.com

    git config --global http.proxy 127.0.0.1:8123
    git clone https://github.com/xxx/xxx.git
    git xxx
    git xxx
    git config --global --unset-all http.proxy


    11 changes: 11 additions & 0 deletions shadowsocks.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    [Unit]
    Description=Shadowsocks iClient
    After=network.target

    [Service]
    ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/config.json
    ExecStartPost=/usr/bin/polipo socksParentProxy=localhost:1081
    Restart=on-abort

    [Install]
    WantedBy=multi-user.target