1. Download Privoxy
2. Add the following 2 lines to the configuration file (config / config.txt)
`listen-address 127.0.0.1:8118
forward-socks5 / 127.0.0.1:1080 .`
(The first line is the address where http proxy server listens,
the second line is the socks5 server address)
Showing posts with label proxy. Show all posts
Showing posts with label proxy. Show all posts
Tuesday, October 29, 2019
Thursday, August 1, 2019
Reinstall ubuntu 19.04 dual boot on T470p - Setting (1)
1. Fix Windows and Linux Showing Different Times When Dual Booting
To make linux use Local Time (not UTC time):
`timedatectl set-local-rtc 1 --adjust-system-clock`
To check your current settings, run:
`timedatectl`
To undo this change:
`timedatectl set-local-rtc 0 --adjust-system-clock`
@reference_1_ howtogeek.com
2. Add a (command) directory to the '$PATH' in Ubuntu
To make linux use Local Time (not UTC time):
`timedatectl set-local-rtc 1 --adjust-system-clock`
To check your current settings, run:
`timedatectl`
To undo this change:
`timedatectl set-local-rtc 0 --adjust-system-clock`
@reference_1_ howtogeek.com
2. Add a (command) directory to the '$PATH' in Ubuntu
Edit `.bashrc` in your home directory and add the following line:
`export PATH="/path/to/dir:$PATH"`
You will need to source your '.bashrc' or logout/login (or restart the terminal) for the changes to take effect. To source your '.bashrc', simply type
You will need to source your '.bashrc' or logout/login (or restart the terminal) for the changes to take effect. To source your '.bashrc', simply type
`source ~/.bashrc`
Edit: `/etc/proxychains.conf` (`chmod...` etc.)
Add:
Note that: there is a DNS issue in "tsocks"
Use the following script to switch ports:
`re='^[0-9]{4}$'
if [ "$#" -eq "0" ]
then
echo "Error: No arguments supplied"
else
if ! [[ $1 =~ $re ]] ; then
echo "Error: argument '$1' is illegal!"
else sudo sed -i -r 's/(127.0.0.1 )([0-9]{4})/\1'"$1"'/g' /etc/proxychains.conf
fi
fi`
@reference_3_yuzhangbit.github.io
4. Add “New Document” back to the right-click menu
`touch ~/Templates/"Untitled Document"`
@reference_1_vitux.com
5. How to auto-mount windows 10 ntfs partition in dual-boot ubuntu system ?
"Activities" --> search "Disks" --> select the partition to auto-mount -->
click [gears icon] (Additional partition options) -->
click "Edit Mount Options..." -->
turn off "User Session Defaults" -->
set "Mount Point" to `/media/xxxxx/D Volume` (or other pathes) -->
click "OK" --> reboot system to check
Add:
`
socks5 127.0.0.1 1080`Note that: there is a DNS issue in "tsocks"
Use the following script to switch ports:
`re='^[0-9]{4}$'
if [ "$#" -eq "0" ]
then
echo "Error: No arguments supplied"
else
if ! [[ $1 =~ $re ]] ; then
echo "Error: argument '$1' is illegal!"
else sudo sed -i -r 's/(127.0.0.1 )([0-9]{4})/\1'"$1"'/g' /etc/proxychains.conf
fi
fi`
@reference_3_yuzhangbit.github.io
4. Add “New Document” back to the right-click menu
`touch ~/Templates/"Untitled Document"`
@reference_1_vitux.com
5. How to auto-mount windows 10 ntfs partition in dual-boot ubuntu system ?
"Activities" --> search "Disks" --> select the partition to auto-mount -->
click [gears icon] (Additional partition options) -->
click "Edit Mount Options..." -->
turn off "User Session Defaults" -->
set "Mount Point" to `/media/xxxxx/D Volume` (or other pathes) -->
click "OK" --> reboot system to check
Sunday, July 7, 2019
Build a 'trojan' server
Step 1:
(a). install nginx
(b). install letsencrypt as previously posted
Step 2:
(a). obtaining a Let's Encrypt SSL certificate
(b). set 'live' and 'archive' folder in 'letsencrypt' to 755 recursively
@ref_github_1
Step 3:
change nginx configuration as follws:
`
@ref_blog.siaimes.me_2
Step 4:
Option 1: Install 'trojan' from github:
@ref_trojan-gfw.github.io_3
(a).
run
`
to install all the necessary dependencies.
(b).
`
`
(c).
`
`
`
`
`
`
(d).
edit '/usr/local/etc/trojan/config.json'
set "password"
set "cert": "/etc/letsencrypt/live/example.com/fullchain.pem"
set "key": "/etc/letsencrypt/live/example.com/privkey.pem"
set "alpn": [ "http/2.0" ]
(e).
`systemctl restart trojan nginx`
`systemctl status trojan nginx`
`systemctl enable trojan nginx`
Option 2: Install 'trojan' from 'apt repository'
(a).
`
@ref_blog.siaimes.me_4
Step 5:
Firewall:
'
@ref_blog.siaimes.me_5
(a). install nginx
(b). install letsencrypt as previously posted
Step 2:
(a). obtaining a Let's Encrypt SSL certificate
(b). set 'live' and 'archive' folder in 'letsencrypt' to 755 recursively
@ref_github_1
Step 3:
change nginx configuration as follws:
`
server { listen 127.0.0.1:80 default_server; server_name example.com; location / {
proxy_redirect off; proxy_pass https://www.xxxx.net; } } server { listen 127.0.0.1:80; server_name 100.100.100.100; # server IP address return 301 https://example.com; } server { listen 0.0.0.0:80; listen [::]:80; server_name _; return 301 https://example.com; }`
@ref_blog.siaimes.me_2
Step 4:
Option 1: Install 'trojan' from github:
@ref_trojan-gfw.github.io_3
(a).
run
`
sudo apt -y install build-essential cmake libboost-system-dev libboost-program-options-dev libssl-dev default-libmysqlclient-dev`
to install all the necessary dependencies.
(b).
`
git clone https://github.com/trojan-gfw/trojan.git
``
cd trojan/
`(c).
`
mkdir build
``
cd build/
``
cmake ..
``
make
``
ctest
``
make install
`(d).
edit '/usr/local/etc/trojan/config.json'
set "password"
set "cert": "/etc/letsencrypt/live/example.com/fullchain.pem"
set "key": "/etc/letsencrypt/live/example.com/privkey.pem"
set "alpn": [ "http/2.0" ]
(e).
`systemctl restart trojan nginx`
`systemctl status trojan nginx`
`systemctl enable trojan nginx`
Option 2: Install 'trojan' from 'apt repository'
(a).
`
apt install software-properties-common add-apt-repository ppa:greaterfire/trojan apt update
apt install trojan trojan version vi /etc/trojan/config.json`
@ref_blog.siaimes.me_4
Step 5:
Firewall:
'
apt install ufw
ufw allow ssh # Or port number
ufw allow https
ufw allow http
ufw enable
ufw status
ufw status verbose
'@ref_blog.siaimes.me_5
Subscribe to:
Posts (Atom)