Posts

How to set syncthing on server correctly

Why you need this? It's simple, you don't wanna upload or download by yourself. 0. download and uncompress package `wget https://github.com/syncthing/syncthing/releases/download/v0.14.44-rc.3/syncthing-linux-amd64-v0.14.44-rc.3.tar.gz` `tar xf syncthing-linux-amd64-v0.14.44-rc.3.tar.gz` 'mv syncthing-linux-amd64-v0.14.44-rc.3 syncthing' 1. you can't run syncthing in root mode. add a user by `adduser user` 2. setting auto start when boot `cp syncthing/syncthing /usr/bin/` `cp syncthing/etc/linux-systemd/system/syncthing@.service /etc/systemd/system/syncthing@user.service` ` systemctl enable syncthing@user.service ` 3. run to get config file ` systemctl start syncthing@user.service ` 4. change localhost to 0.0.0.0 `vim /home/user/.config/syncthing/config.xml` replace `127.0.0.1` with `0.0.0.0` 5. reboot and see `reboot` see `http://your_server_ip:8384`

Change User-Agent through HTTP-Proxy

#### Install Privoxy `sudo apt install privoxy` #### Change config `sudo vim /etc/privoxy/config` 1. Search `listen-address` and replace it with: `listen-address 0.0.0.0:8118` 2. Search `enable-remote-toggle` , `enable-edit-actions` and make sure they're enabled. 3. At the end of the file, add the following rules: ``` # passby all https connection: forward :443 . # passby the login page: forward 192.168.138.180 . ``` #### Change config through webpage 1. Open `http://p.p` in your browser 2. Choose `View & change the current configuration` 3. Find `match-all.action` and click `Edit` 4. Enable `hide-referrer` and `hide-from-header` 5. Find `User Agent string to send`, write down ` Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36` 6. Click `Submit` at the  the page 7. Remove or Delete all other rules you can see on those webpages. 8. In the end, it looks like this: ```...

How to set Chinese Input Method on Lubuntu

1. Install RIME ` sudo apt-get install ibus-rime` `sudo apt-get install librime-data-pinyin-simp  ` https://github.com/rime/home/wiki/RimeWithIBus#ubuntu 2. Select Input Engine Preference -> Language Support -> Install Chinese Language and Select IBus as Keyboard input method system 3. Ready to use  `reboot` Press Super + space to switch input method. Press F4 to switch schema(simple or complex). Left to do: `sudo apt autoremove fcitx*`

Thoughts came from A New University Baby.

1. No Official Solution In real world, there is no absolutely solution for one specific problem, you have to find out the solution right for you, which makes you getting the most benefit. 2. How you learning Sometimes we feel upset is just because of things may not happen as we thought before. That's OK. Due to that, you'll learned how to improve yourself with better prediction and consideration. This kind of training makes man intelligent, it's also the inner theory of Deep Learning.

Giving a proxy to docker using polipo in ubuntu

0. Make sure you have shadowsocks running in the background https://yingshaoxo.blogspot.com/2017/07/bypass-great-firewall-by-using.html 1. First, set a http_proxy `sudo apt install polipo` `sudo vim /etc/polipo/config` add following and save it: ``` proxyAddress = "0.0.0.0" proxyPort = 1088 socksParentProxy = "localhost:1080" socksProxyType = socks5 ``` `sudo service polipo restart` Now you got a http_proxy at localhost:1088. 2. Give that proxy to docker `sudo vim /etc/default/docker` add or change to `export http_proxy="localhost:1088/"` `sudo service docker restart`

Hot Day

Hello, when you saw this post, I'm in a hot day. That's something weird living in this situation. The day is hot, and my heart also hot, I want to do something great. But helplessly nothing I did. 心里的火焰很强烈,但不知从何下手。 或许我该停下来看书,或许我该静下来学习网课。 I don't know.

Bypass great firewall by using shadowsocks

1. Install shadowsocks first(server) apt-get update apt-get upgrade apt install python3-pip pip3 install setuptools --upgrade pip3 install shadowsocks --upgrade vi ss.json { "server": "45.63.80.154", "port_password": {"8000": "passwd1", "6666": "passwd2"}, "timeout": 300, "method": "aes-256-cfb" } ssserver -c ss.json -d start ssserver -d stop ssserver -c ss.json -d restart You can use bbr to speed up: wget https://down.vpsmm.com/shell/bbr.sh && bash bbr.sh 1. Install shadowsocks first(local) apt-get update apt install python3-pip pip3 install shadowsocks --upgrade locate sslocal crontab -e @reboot /usr/local/bin/sslocal -s 45.63.80.154 -p 8000 -k passwd1 -d start sudo reboot 2. Install proxychains for terminal sudo apt install proxychains vim /etc/proxychains.conf [ProxyList] socks5 127.0.0.1 1080 proxychains curl google.com