Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save QuLk/2f482746f3dff29c795a52be4c4c9a8e to your computer and use it in GitHub Desktop.
Save QuLk/2f482746f3dff29c795a52be4c4c9a8e to your computer and use it in GitHub Desktop.

Revisions

  1. QuLk revised this gist Nov 27, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -210,10 +210,11 @@ socket.error: [errno 98] Address already in use.
    And Shadowsocks seems not started (not sure. Someone says cannot connect to shadowsocks server in China, but the other can in USA). In this case, need to release the port and start Shadowsocks server manually:
    ```
    sudo fuser 8388/tcp
    sudo netstat -anp | grep 8388
    sudo fuser -k 8388/tcp
    sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```

    Using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. Or, use "sudo netstat -anp | grep 8388" to see if 8388 is occupied by any PID and which program occupies it.
    Using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. Or, use "sudo netstat -anp | grep 8388" to see if 8388 is occupied by any PID and which program occupies it. \
    Using "sudo fuser -k 8388/tcp", to kill any PID which occupies the port 8388.

  2. QuLk revised this gist Nov 27, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -214,6 +214,6 @@ sudo fuser -k 8388/tcp
    sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```

    Using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. \
    Using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. Or, use "sudo netstat -anp | grep 8388" to see if 8388 is occupied by any PID and which program occupies it.
    Using "sudo fuser -k 8388/tcp", to kill any PID which occupies the port 8388.

  3. QuLk revised this gist Nov 27, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -214,6 +214,6 @@ sudo fuser -k 8388/tcp
    sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```

    using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. \
    using "sudo fuser -k 8388/tcp", to kill any PID which occupies the port 8388.
    Using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. \
    Using "sudo fuser -k 8388/tcp", to kill any PID which occupies the port 8388.

  4. QuLk revised this gist Nov 27, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -202,7 +202,7 @@ Example for NetGear router users:
    \
    You are all set. Enjoy Shadowsocks !

    **Note:**
    **Note:** \
    Somehow after restart Raspberry Pi, the port 8388 is not released based on tail /var/log/shadowsocks.log. It says:
    ```
    socket.error: [errno 98] Address already in use.
    @@ -215,5 +215,5 @@ sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```

    using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. \
    using "sudo fuser -k 8388/tcp", to kill any PID which occupies the port 8388. \
    using "sudo fuser -k 8388/tcp", to kill any PID which occupies the port 8388.

  5. QuLk revised this gist Nov 27, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -207,7 +207,7 @@ Somehow after restart Raspberry Pi, the port 8388 is not released based on tail
    ```
    socket.error: [errno 98] Address already in use.
    ```
    And Shadowsocks seems not started (not sure. Someone says cannot connected in China but I can in USA). In this case, need to release the port and start Shadowsocks server manually:
    And Shadowsocks seems not started (not sure. Someone says cannot connect to shadowsocks server in China, but the other can in USA). In this case, need to release the port and start Shadowsocks server manually:
    ```
    sudo fuser 8388/tcp
    sudo fuser -k 8388/tcp
  6. QuLk revised this gist Nov 27, 2018. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -201,3 +201,19 @@ Example for NetGear router users:
    \
    \
    You are all set. Enjoy Shadowsocks !

    **Note:**
    Somehow after restart Raspberry Pi, the port 8388 is not released based on tail /var/log/shadowsocks.log. It says:
    ```
    socket.error: [errno 98] Address already in use.
    ```
    And Shadowsocks seems not started (not sure. Someone says cannot connected in China but I can in USA). In this case, need to release the port and start Shadowsocks server manually:
    ```
    sudo fuser 8388/tcp
    sudo fuser -k 8388/tcp
    sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```

    using "sudo fuser 8388/tcp", to see if 8388 is occupied by any PID. \
    using "sudo fuser -k 8388/tcp", to kill any PID which occupies the port 8388. \

  7. QuLk revised this gist Jul 19, 2018. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -9,10 +9,10 @@ https://www.linuxbabe.com/linux-server/setup-your-own-shadowsocks-server-on-debi
    This article uses RASPBERRY PI 3 MODEL B, OS version: Raspbian GNU/Linux 9 (stretch).

    There are four main sections in this article:
    1. Preparing
    1. Installing Shadowsocks
    1. Port forwarding
    1. Set up dynamic DNS
    1. [Preparing](https://gist.github.com/QuLk/2f482746f3dff29c795a52be4c4c9a8e#1-preparing)
    1. [Installing Shadowsocks](https://gist.github.com/QuLk/2f482746f3dff29c795a52be4c4c9a8e#2-installing-shadowsocks)
    1. [Port forwarding](https://gist.github.com/QuLk/2f482746f3dff29c795a52be4c4c9a8e#3-port-forwarding)
    1. [Set up dynamic DNS](https://gist.github.com/QuLk/2f482746f3dff29c795a52be4c4c9a8e#4-set-up-dynamic-dns)


    ### 1. Preparing
  8. QuLk revised this gist Jul 19, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,8 @@ Download NOOBS to laptop from https://www.raspberrypi.org/downloads/
    #### 1.3 install Raspbian on Raspberry Pi
    Follow the [software setup guide](https://www.raspberrypi.org/learning/software-guide/) and [NOOBS setup guide](https://www.raspberrypi.org/help/videos/#noobs-setup) video to install Raspbian on Raspberry Pi 3 Model B via SD card.

    Or follow the instruction here: [Install Raspbian on a Raspberry Pi 3](https://gist.github.com/QuLk/3175270304abccba624ba52a575cd05c)

    #### 1.4 Make sure the Pi connects to your WIFI

    #### 1.5 Set up static IP
  9. QuLk revised this gist Jul 15, 2018. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -171,17 +171,17 @@ You will see you IP address in the webpage.

    #### 4.2 Create a free account at www.noip.com

    NetGear router user refer: https://kb.netgear.com/23859/How-to-create-a-No-IP-Dynamic-DNS-Account
    NetGear router users refer: https://kb.netgear.com/23859/How-to-create-a-No-IP-Dynamic-DNS-Account

    **host name**: is the domain name, such as my.noip.com, something like that. \
    **IP/Target**: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target. By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.

    #### 4.3 Set up dynamic DNS in your router

    NetGear router user refer: https://kb.netgear.com/23930/How-to-setup-Dynamic-DNS-on-a-NETGEAR-router-using-www-no-ip-com \
    Other router user needs to search your router help on this topic.
    NetGear router users refer: https://kb.netgear.com/23930/How-to-setup-Dynamic-DNS-on-a-NETGEAR-router-using-www-no-ip-com \
    Other router users need to search your router help on this topic.

    Example for NetGear router user:
    Example for NetGear router users:
    1. Type http://www.routerlogin.net or http://www.routerlogin.com in your browser.
    1. A login screen displays.
    1. Enter the router user name and password.
  10. QuLk revised this gist Jul 15, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -65,7 +65,7 @@ static ip_address=<Pi's ip>/24
    static routers=<route's ip>
    static domain_name_servers=<route's ip> 8.8.8.8
    ```

    \
    For example:
    ```
    interface wlan0
    @@ -145,7 +145,7 @@ sudo ssserver -c /etc/shadowsocks/config.json -d start

    ### 3. Port forwarding

    I user NetGear router. It supports port forwarding.
    I use NetGear router. It supports port forwarding.

    Refer: \
    http://www.noip.com/support/knowledgebase/setting-port-forwarding-netgear-router-genie-firmware/ \
  11. QuLk revised this gist Jul 14, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -155,9 +155,9 @@ About how to setup port forwarding on your router, please search your router hel

    Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    --------------|---------------|---------------------|---------------|---------------------
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20
    | Service Name | External Port | External IP Address | Internal Port | Internal IP Address |
    |:------------:|:-------------:|:-------------------:|:-------------:|:-------------------:|
    | 2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20 |


    ### 4. Set up dynamic DNS
  12. QuLk revised this gist Jul 14, 2018. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -74,17 +74,17 @@ static routers=192.168.0.1
    static domain_name_servers=192.168.0.1 8.8.8.8
    ```

    ## 2. Installing Shadowsocks
    ### 2. Installing Shadowsocks

    ### 2.1 Update local package index
    #### 2.1 Update local package index
    ```bash
    $ sudo apt-get update
    ```
    ### 2.2 Install shadowsocks
    #### 2.2 Install shadowsocks
    Search shadowsocks via _**start -> preference -> add/remove software**_ and install it. \
    I select shadowsocks-2.9.0-2 to install.

    ### 2.3 Edit config.json
    #### 2.3 Edit config.json

    There is a template in the file config.json. You need to modify it according to your server IP, server port, password for Shadowsocks.

    @@ -109,7 +109,7 @@ Modify the template as below lines:
    }
    ```

    ### 2.4 Start the Shadowsocks server
    #### 2.4 Start the Shadowsocks server

    To start it:
    ```bash
    @@ -131,7 +131,7 @@ To see the activity of the Shadowsocks server:
    $ tail /var/log/shadowsocks.log
    ```

    ### 2.5 Auto start on system boot
    #### 2.5 Auto start on system boot

    Edit .profile:
    ```bash
    @@ -143,7 +143,7 @@ Add the start server command to the bottom of .profile:
    sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```

    ## 3. Port forwarding
    ### 3. Port forwarding

    I user NetGear router. It supports port forwarding.

    @@ -160,23 +160,23 @@ Below service name 2 is the one I use for Shadowsocks on my NetGear router.
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20


    ## 4. Set up dynamic DNS
    ### 4. Set up dynamic DNS

    ### 4.1 Check your router Internet IP
    #### 4.1 Check your router Internet IP

    To know your router Internet IP, you can go to website: \
    https://whatismyipaddress.com/

    You will see you IP address in the webpage.

    ### 4.2 Create a free account at www.noip.com
    #### 4.2 Create a free account at www.noip.com

    NetGear router user refer: https://kb.netgear.com/23859/How-to-create-a-No-IP-Dynamic-DNS-Account

    **host name**: is the domain name, such as my.noip.com, something like that. \
    **IP/Target**: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target. By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.

    ### 4.3 Set up dynamic DNS in your router
    #### 4.3 Set up dynamic DNS in your router

    NetGear router user refer: https://kb.netgear.com/23930/How-to-setup-Dynamic-DNS-on-a-NETGEAR-router-using-www-no-ip-com \
    Other router user needs to search your router help on this topic.
  13. QuLk revised this gist Jul 14, 2018. 1 changed file with 21 additions and 19 deletions.
    40 changes: 21 additions & 19 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Set up Shadowsocks server on Raspberry Pi
    ## Set up Shadowsocks server on Raspberry Pi
    By QuLk @ 2018.7.12

    Refer:
    @@ -15,20 +15,20 @@ There are four main sections in this article:
    1. Set up dynamic DNS


    ## 1. Preparing
    ### 1. Preparing

    ### 1.1 Buy Raspberry Pi
    #### 1.1 Buy Raspberry Pi
    Buy Raspberry Pi 3 Model B from https://www.raspberrypi.org/products/

    ### 1.2 Download NOOBS
    #### 1.2 Download NOOBS
    Download NOOBS to laptop from https://www.raspberrypi.org/downloads/

    ### 1.3 install Raspbian on Raspberry Pi
    #### 1.3 install Raspbian on Raspberry Pi
    Follow the [software setup guide](https://www.raspberrypi.org/learning/software-guide/) and [NOOBS setup guide](https://www.raspberrypi.org/help/videos/#noobs-setup) video to install Raspbian on Raspberry Pi 3 Model B via SD card.

    ### 1.4 Make sure the Pi connects to your WIFI
    #### 1.4 Make sure the Pi connects to your WIFI

    ### 1.5 Set up static IP
    #### 1.5 Set up static IP

    I’ve configured my Pi so the Pi always uses a static IP address. \
    Here I refer the link to set up Raspberry Pi to have a static IP address: \
    @@ -74,17 +74,17 @@ static routers=192.168.0.1
    static domain_name_servers=192.168.0.1 8.8.8.8
    ```

    # 2. Installing Shadowsocks
    ## 2. Installing Shadowsocks

    ## 2.1 Update local package index
    ### 2.1 Update local package index
    ```bash
    $ sudo apt-get update
    ```
    ## 2.2 Install shadowsocks
    ### 2.2 Install shadowsocks
    Search shadowsocks via _**start -> preference -> add/remove software**_ and install it. \
    I select shadowsocks-2.9.0-2 to install.

    ## 2.3 Edit config.json
    ### 2.3 Edit config.json

    There is a template in the file config.json. You need to modify it according to your server IP, server port, password for Shadowsocks.

    @@ -109,7 +109,7 @@ Modify the template as below lines:
    }
    ```

    ## 2.4 Start the Shadowsocks server
    ### 2.4 Start the Shadowsocks server

    To start it:
    ```bash
    @@ -131,7 +131,7 @@ To see the activity of the Shadowsocks server:
    $ tail /var/log/shadowsocks.log
    ```

    ## 2.5 Auto start on system boot
    ### 2.5 Auto start on system boot

    Edit .profile:
    ```bash
    @@ -143,7 +143,7 @@ Add the start server command to the bottom of .profile:
    sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```

    # 3. Port forwarding
    ## 3. Port forwarding

    I user NetGear router. It supports port forwarding.

    @@ -160,23 +160,23 @@ Below service name 2 is the one I use for Shadowsocks on my NetGear router.
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20


    # 4. Set up dynamic DNS
    ## 4. Set up dynamic DNS

    ## 4.1 Check your router Internet IP
    ### 4.1 Check your router Internet IP

    To know your router Internet IP, you can go to website: \
    https://whatismyipaddress.com/

    You will see you IP address in the webpage.

    ## 4.2 Create a free account at www.noip.com
    ### 4.2 Create a free account at www.noip.com

    NetGear router user refer: https://kb.netgear.com/23859/How-to-create-a-No-IP-Dynamic-DNS-Account

    **host name**: is the domain name, such as my.noip.com, something like that. \
    **IP/Target**: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target. By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.

    ## 4.3 Set up dynamic DNS in your router
    ### 4.3 Set up dynamic DNS in your router

    NetGear router user refer: https://kb.netgear.com/23930/How-to-setup-Dynamic-DNS-on-a-NETGEAR-router-using-www-no-ip-com \
    Other router user needs to search your router help on this topic.
    @@ -195,5 +195,7 @@ Example for NetGear router user:
    **Host name** is the one you created at www.noip.com. \
    **User name** is your account name at www.noip.com. \
    **Password** is your account password at www.noip.com.

    \
    \
    \
    You are all set. Enjoy Shadowsocks !
  14. QuLk revised this gist Jul 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -81,7 +81,7 @@ static domain_name_servers=192.168.0.1 8.8.8.8
    $ sudo apt-get update
    ```
    ## 2.2 Install shadowsocks
    Search shadowsocks via start -> preference -> add/remove software and install it. \
    Search shadowsocks via _**start -> preference -> add/remove software**_ and install it. \
    I select shadowsocks-2.9.0-2 to install.

    ## 2.3 Edit config.json
  15. QuLk revised this gist Jul 14, 2018. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -80,9 +80,8 @@ static domain_name_servers=192.168.0.1 8.8.8.8
    ```bash
    $ sudo apt-get update
    ```
    ## 2.2 Install shadowsocks via start -> preference -> add/remove software

    Search shadowsocks. \
    ## 2.2 Install shadowsocks
    Search shadowsocks via start -> preference -> add/remove software and install it. \
    I select shadowsocks-2.9.0-2 to install.

    ## 2.3 Edit config.json
  16. QuLk revised this gist Jul 14, 2018. No changes.
  17. QuLk revised this gist Jul 14, 2018. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -17,11 +17,14 @@ There are four main sections in this article:

    ## 1. Preparing

    ### 1.1 Buy Raspberry Pi 3 Model B from https://www.raspberrypi.org/products/
    ### 1.1 Buy Raspberry Pi
    Buy Raspberry Pi 3 Model B from https://www.raspberrypi.org/products/

    ### 1.2 Download NOOBS to laptop from https://www.raspberrypi.org/downloads/
    ### 1.2 Download NOOBS
    Download NOOBS to laptop from https://www.raspberrypi.org/downloads/

    ### 1.3 Follow the [software setup guide](https://www.raspberrypi.org/learning/software-guide/) and [NOOBS setup guide](https://www.raspberrypi.org/help/videos/#noobs-setup) video to install Raspbian on Raspberry Pi 3 Model B via SD card.
    ### 1.3 install Raspbian on Raspberry Pi
    Follow the [software setup guide](https://www.raspberrypi.org/learning/software-guide/) and [NOOBS setup guide](https://www.raspberrypi.org/help/videos/#noobs-setup) video to install Raspbian on Raspberry Pi 3 Model B via SD card.

    ### 1.4 Make sure the Pi connects to your WIFI

  18. QuLk revised this gist Jul 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -155,7 +155,7 @@ Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    --------------|---------------|---------------------|---------------|---------------------
    2 |TCP: 8388|Any|TCP: 8388|192.168.0.20
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20


    # 4. Set up dynamic DNS
  19. QuLk revised this gist Jul 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -155,7 +155,7 @@ Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    --------------|---------------|---------------------|---------------|---------------------
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20
    2 |TCP: 8388|Any|TCP: 8388|192.168.0.20


    # 4. Set up dynamic DNS
  20. QuLk revised this gist Jul 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -155,7 +155,7 @@ Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    --------------|---------------|---------------------|---------------|---------------------
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20


    # 4. Set up dynamic DNS
  21. QuLk revised this gist Jul 14, 2018. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -153,8 +153,8 @@ About how to setup port forwarding on your router, please search your router hel

    Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    -------------|---------------|---------------------|---------------|--------------------
    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    --------------|---------------|---------------------|---------------|---------------------
    2 | TCP: 8388 | Any | TCP: 8388 | 192.168.0.20


    @@ -171,8 +171,8 @@ You will see you IP address in the webpage.

    NetGear router user refer: https://kb.netgear.com/23859/How-to-create-a-No-IP-Dynamic-DNS-Account

    host name: is the domain name, such as my.noip.com, something like that. \
    IP/Target: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target. By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.
    **host name**: is the domain name, such as my.noip.com, something like that. \
    **IP/Target**: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target. By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.

    ## 4.3 Set up dynamic DNS in your router

    @@ -190,8 +190,8 @@ Example for NetGear router user:
    1. Enable the Use a Dynamic DNS Service tick box, and then choose the 'Service Provider' as www.no-ip.com
    1. Enter the Host name, Username and password for No-IP. Please note your No-IP account must already be created and registered.

    Host name is the one you created at www.noip.com. \
    User name is your account name at www.noip.com. \
    Password is your account password at www.noip.com.
    **Host name** is the one you created at www.noip.com. \
    **User name** is your account name at www.noip.com. \
    **Password** is your account password at www.noip.com.

    You are all set. Enjoy Shadowsocks !
  22. QuLk revised this gist Jul 14, 2018. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ There are four main sections in this article:

    I’ve configured my Pi so the Pi always uses a static IP address. \
    Here I refer the link to set up Raspberry Pi to have a static IP address: \
    https://www.raspberrypi.org/learning/networking-lessons/rpi-static-ip-address/ \
    https://www.raspberrypi.org/learning/networking-lessons/rpi-static-ip-address/

    Use ifconfig command or ip command to check the local IP. \
    For example:
    @@ -80,11 +80,11 @@ $ sudo apt-get update
    ## 2.2 Install shadowsocks via start -> preference -> add/remove software

    Search shadowsocks. \
    I select shadowsocks-2.9.0-2 to install. \
    I select shadowsocks-2.9.0-2 to install.

    ## 2.3 Edit config.json

    There is a template in the file config.json. You need to modify it according to your server IP, server port, password for Shadowsocks.\
    There is a template in the file config.json. You need to modify it according to your server IP, server port, password for Shadowsocks.

    Example:
    ```bash
    @@ -143,15 +143,15 @@ sudo ssserver -c /etc/shadowsocks/config.json -d start

    # 3. Port forwarding

    I user NetGear router. It supports port forwarding. \
    I user NetGear router. It supports port forwarding.

    Refer: \
    http://www.noip.com/support/knowledgebase/setting-port-forwarding-netgear-router-genie-firmware/ \
    https://kb.netgear.com/24290/How-do-I-add-a-custom-port-forwarding-service-on-my-Nighthawk-router \
    https://kb.netgear.com/24290/How-do-I-add-a-custom-port-forwarding-service-on-my-Nighthawk-router

    About how to setup port forwarding on your router, please search your router help to see if it can and how to setup your router for port forwarding. \
    About how to setup port forwarding on your router, please search your router help to see if it can and how to setup your router for port forwarding.

    Below service name 2 is the one I use for Shadowsocks on my NetGear router. \
    Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    -------------|---------------|---------------------|---------------|--------------------
    @@ -163,9 +163,9 @@ Below service name 2 is the one I use for Shadowsocks on my NetGear router. \
    ## 4.1 Check your router Internet IP

    To know your router Internet IP, you can go to website: \
    https://whatismyipaddress.com/ \
    https://whatismyipaddress.com/

    You will see you IP address in the webpage. \
    You will see you IP address in the webpage.

    ## 4.2 Create a free account at www.noip.com

    @@ -177,7 +177,7 @@ IP/Target: is your router Internet IP, provided by your Internet provider, such
    ## 4.3 Set up dynamic DNS in your router

    NetGear router user refer: https://kb.netgear.com/23930/How-to-setup-Dynamic-DNS-on-a-NETGEAR-router-using-www-no-ip-com \
    Other router user needs to search your router help on this topic. \
    Other router user needs to search your router help on this topic.

    Example for NetGear router user:
    1. Type http://www.routerlogin.net or http://www.routerlogin.com in your browser.
    @@ -192,6 +192,6 @@ Example for NetGear router user:

    Host name is the one you created at www.noip.com. \
    User name is your account name at www.noip.com. \
    Password is your account password at www.noip.com. \
    Password is your account password at www.noip.com.

    You are all set. Enjoy Shadowsocks !
  23. QuLk revised this gist Jul 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ By QuLk @ 2018.7.12
    Refer:
    https://medium.freecodecamp.org/running-your-own-openvpn-server-on-a-raspberry-pi-8b78043ccdea \
    https://www.reddit.com/r/China/comments/8hp0kr/shadowsocks_server_on_raspberry_pi/ \
    https://www.linuxbabe.com/linux-server/setup-your-own-shadowsocks-server-on-debian-ubuntu-centos \
    https://www.linuxbabe.com/linux-server/setup-your-own-shadowsocks-server-on-debian-ubuntu-centos

    This article uses RASPBERRY PI 3 MODEL B, OS version: Raspbian GNU/Linux 9 (stretch).

  24. QuLk revised this gist Jul 14, 2018. 1 changed file with 20 additions and 20 deletions.
    40 changes: 20 additions & 20 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -32,15 +32,15 @@ Here I refer the link to set up Raspberry Pi to have a static IP address: \
    https://www.raspberrypi.org/learning/networking-lessons/rpi-static-ip-address/ \

    Use ifconfig command or ip command to check the local IP. \
    For example: \
    For example:
    ```bash
    $ ip -4 addr show | grep global
    inet 192.168.0.20/24 brd 192.168.0.255 scope global wlan0
    inet 10.8.0.1/24 brd 10.8.0.255 scope global tun0
    ```
    192.168.0.20 is the Pi's IP.

    Use "traceroute google.com" to check the route IP.
    Use "traceroute google.com" to check the route IP. \
    For example:
    ```bash
    $ traceroute google.com
    @@ -79,12 +79,12 @@ $ sudo apt-get update
    ```
    ## 2.2 Install shadowsocks via start -> preference -> add/remove software

    Search shadowsocks.
    I select shadowsocks-2.9.0-2 to install.
    Search shadowsocks. \
    I select shadowsocks-2.9.0-2 to install. \

    ## 2.3 Edit config.json

    There is a template in the file config.json. You need to modify it according to your server IP, server port, password for Shadowsocks.
    There is a template in the file config.json. You need to modify it according to your server IP, server port, password for Shadowsocks.\

    Example:
    ```bash
    @@ -143,15 +143,15 @@ sudo ssserver -c /etc/shadowsocks/config.json -d start

    # 3. Port forwarding

    I user NetGear router. It supports port forwarding.
    I user NetGear router. It supports port forwarding. \

    Refer:
    http://www.noip.com/support/knowledgebase/setting-port-forwarding-netgear-router-genie-firmware/
    https://kb.netgear.com/24290/How-do-I-add-a-custom-port-forwarding-service-on-my-Nighthawk-router
    Refer: \
    http://www.noip.com/support/knowledgebase/setting-port-forwarding-netgear-router-genie-firmware/ \
    https://kb.netgear.com/24290/How-do-I-add-a-custom-port-forwarding-service-on-my-Nighthawk-router \

    About how to setup port forwarding on your router, please search your router help to see if it can and how to setup your router for port forwarding.
    About how to setup port forwarding on your router, please search your router help to see if it can and how to setup your router for port forwarding. \

    Below service name 2 is the one I use for Shadowsocks on my NetGear router.
    Below service name 2 is the one I use for Shadowsocks on my NetGear router. \

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    -------------|---------------|---------------------|---------------|--------------------
    @@ -162,22 +162,22 @@ Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    ## 4.1 Check your router Internet IP

    To know your router Internet IP, you can go to website:
    https://whatismyipaddress.com/
    To know your router Internet IP, you can go to website: \
    https://whatismyipaddress.com/ \

    You will see you IP address in the webpage.
    You will see you IP address in the webpage. \

    ## 4.2 Create a free account at www.noip.com

    NetGear router user refer: https://kb.netgear.com/23859/How-to-create-a-No-IP-Dynamic-DNS-Account

    host name: is the domain name, such as my.noip.com, something like that.
    host name: is the domain name, such as my.noip.com, something like that. \
    IP/Target: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target. By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.

    ## 4.3 Set up dynamic DNS in your router

    NetGear router user refer: https://kb.netgear.com/23930/How-to-setup-Dynamic-DNS-on-a-NETGEAR-router-using-www-no-ip-com
    Other router user needs to search your router help on this topic.
    NetGear router user refer: https://kb.netgear.com/23930/How-to-setup-Dynamic-DNS-on-a-NETGEAR-router-using-www-no-ip-com \
    Other router user needs to search your router help on this topic. \

    Example for NetGear router user:
    1. Type http://www.routerlogin.net or http://www.routerlogin.com in your browser.
    @@ -190,8 +190,8 @@ Example for NetGear router user:
    1. Enable the Use a Dynamic DNS Service tick box, and then choose the 'Service Provider' as www.no-ip.com
    1. Enter the Host name, Username and password for No-IP. Please note your No-IP account must already be created and registered.

    Host name is the one you created at www.noip.com.
    User name is your account name at www.noip.com.
    Password is your account password at www.noip.com.
    Host name is the one you created at www.noip.com. \
    User name is your account name at www.noip.com. \
    Password is your account password at www.noip.com. \

    You are all set. Enjoy Shadowsocks !
  25. QuLk revised this gist Jul 14, 2018. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@
    By QuLk @ 2018.7.12

    Refer:
    https://medium.freecodecamp.org/running-your-own-openvpn-server-on-a-raspberry-pi-8b78043ccdea
    https://www.reddit.com/r/China/comments/8hp0kr/shadowsocks_server_on_raspberry_pi/
    https://www.linuxbabe.com/linux-server/setup-your-own-shadowsocks-server-on-debian-ubuntu-centos
    https://medium.freecodecamp.org/running-your-own-openvpn-server-on-a-raspberry-pi-8b78043ccdea \
    https://www.reddit.com/r/China/comments/8hp0kr/shadowsocks_server_on_raspberry_pi/ \
    https://www.linuxbabe.com/linux-server/setup-your-own-shadowsocks-server-on-debian-ubuntu-centos \

    This article uses RASPBERRY PI 3 MODEL B, OS version: Raspbian GNU/Linux 9 (stretch).

    @@ -27,12 +27,12 @@ There are four main sections in this article:

    ### 1.5 Set up static IP

    I’ve configured my Pi so the Pi always uses a static IP address.
    Here I refer the link to set up Raspberry Pi to have a static IP address:
    https://www.raspberrypi.org/learning/networking-lessons/rpi-static-ip-address/
    I’ve configured my Pi so the Pi always uses a static IP address. \
    Here I refer the link to set up Raspberry Pi to have a static IP address: \
    https://www.raspberrypi.org/learning/networking-lessons/rpi-static-ip-address/ \

    Use ifconfig command or ip command to check the local IP.
    For example:
    Use ifconfig command or ip command to check the local IP. \
    For example: \
    ```bash
    $ ip -4 addr show | grep global
    inet 192.168.0.20/24 brd 192.168.0.255 scope global wlan0
  26. QuLk revised this gist Jul 14, 2018. 1 changed file with 3 additions and 5 deletions.
    8 changes: 3 additions & 5 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -107,7 +107,7 @@ Modify the template as below lines:
    }
    ```

    ## 2.4 Start the Shadowsocks server.
    ## 2.4 Start the Shadowsocks server

    To start it:
    ```bash
    @@ -151,7 +151,7 @@ https://kb.netgear.com/24290/How-do-I-add-a-custom-port-forwarding-service-on-my

    About how to setup port forwarding on your router, please search your router help to see if it can and how to setup your router for port forwarding.

    Below service name 2 is the one I use for Shadowsocks.
    Below service name 2 is the one I use for Shadowsocks on my NetGear router.

    Service Name | External Port | External IP Address | Internal Port | Internal IP Address
    -------------|---------------|---------------------|---------------|--------------------
    @@ -172,9 +172,7 @@ You will see you IP address in the webpage.
    NetGear router user refer: https://kb.netgear.com/23859/How-to-create-a-No-IP-Dynamic-DNS-Account

    host name: is the domain name, such as my.noip.com, something like that.

    IP/Target: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target.
    By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.
    IP/Target: is your router Internet IP, provided by your Internet provider, such as ComCast, AT&T, etc. Use IPv4 to fill the IP/Target. By default noip.com will fill the current your router Internet IP when you create a new account. But you need to update it every 30 days.

    ## 4.3 Set up dynamic DNS in your router

  27. QuLk revised this gist Jul 14, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -131,12 +131,12 @@ $ tail /var/log/shadowsocks.log

    ## 2.5 Auto start on system boot

    Edit .profile and add the start command to it.
    Edit .profile:
    ```bash
    $vi ~/.profile
    ```

    Add below line to .profile:
    Add the start server command to the bottom of .profile:
    ```
    sudo ssserver -c /etc/shadowsocks/config.json -d start
    ```
  28. QuLk revised this gist Jul 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ https://www.linuxbabe.com/linux-server/setup-your-own-shadowsocks-server-on-debi

    This article uses RASPBERRY PI 3 MODEL B, OS version: Raspbian GNU/Linux 9 (stretch).

    There are four main sections in this article.
    There are four main sections in this article:
    1. Preparing
    1. Installing Shadowsocks
    1. Port forwarding
  29. QuLk revised this gist Jul 14, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -10,9 +10,9 @@ This article uses RASPBERRY PI 3 MODEL B, OS version: Raspbian GNU/Linux 9 (stre

    There are four main sections in this article.
    1. Preparing
    2. Installing Shadowsocks
    3. Port forwarding
    4. Set up dynamic DNS
    1. Installing Shadowsocks
    1. Port forwarding
    1. Set up dynamic DNS


    ## 1. Preparing
  30. QuLk revised this gist Jul 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Set up Shadowsocks server on Raspberry Pi.markdown
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ https://www.linuxbabe.com/linux-server/setup-your-own-shadowsocks-server-on-debi

    This article uses RASPBERRY PI 3 MODEL B, OS version: Raspbian GNU/Linux 9 (stretch).

    There are four main sections in this article.
    There are four main sections in this article.
    1. Preparing
    2. Installing Shadowsocks
    3. Port forwarding