12/25/2022

科学上网: Setup Trojan on AWS 翻墙

首先推荐商业订阅版:https://egjplmujirj2tbj9wuzy.wgetcloud.org/, 价格还可以接受

一定要自己setup就继续往下看:

https://github.com/trojan-gfw/trojan

安装方式搜索:科学上网 Trojan

首先安装:sudo apt install trojan

需要有一个domain name,通过https://certbot.eff.org/申请一个免费的cert

https://github.com/trojan-gfw/trojan/wiki/Binary-&-Package-Distributions

server端配置:

{

    "run_type": "server",

    "local_addr": "0.0.0.0",

    "local_port": 1443,

    "remote_addr": "qq.com",

    "remote_port": 443,

    "password": [

        "password1",

        "password2"

    ],

    "log_level": 1,

    "ssl": {

        "cert": "/etc/letsencrypt/live/yougood.ai/fullchain.pem",

        "key": "/etc/letsencrypt/live/yougood.ai/privkey.pem",

        "key_password": "",

        "cipher": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384",

        "cipher_tls13": "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",

        "prefer_server_cipher": true,

        "alpn": [

            "http/1.1"

        ],

        "alpn_port_override": {

            "h2": 81

        },

        "reuse_session": true,

        "session_ticket": false,

        "session_timeout": 600,

        "plain_http_response": "",

        "curves": "",

        "dhparam": ""

    },

    "tcp": {

        "prefer_ipv4": false,

        "no_delay": true,

        "keep_alive": true,

        "reuse_port": false,

        "fast_open": false,

        "fast_open_qlen": 20

    },

    "mysql": {

        "enabled": false,

        "server_addr": "127.0.0.1",

        "server_port": 3306,

        "database": "trojan",

        "username": "trojan",

        "password": "",

        "key": "",

        "cert": "",

        "ca": ""

    }

}


https://github.com/Loyalsoldier/clash-rules

规则编辑 | Clash for Windows (lbyczf.com)

我的常用配置:One Drive/应用/clash/1671973573180.yml

使用TUN模式:

dns:

  enable: true

  enhanced-mode: fake-ip

  nameserver:

    - 8.8.8.8

    - 8.8.4.4

  fallback: []

  fake-ip-filter:

    - +.stun.*.*

    - +.stun.*.*.*

    - +.stun.*.*.*.*

    - +.stun.*.*.*.*.*

    - "*.n.n.srv.nintendo.net"

    - +.stun.playstation.net

    - xbox.*.*.microsoft.com

    - "*.*.xboxlive.com"

    - "*.msftncsi.com"

    - "*.msftconnecttest.com"

    - WORKGROUP

tun:

  enable: true

  stack: system

  auto-route: true

  auto-detect-interface: true

  dns-hijack:

    - any:53


用TUN模式要把文件C:\Program Files\Clash.for.Windows-0.20.11-win\resources\static\files\win\x64\clash-win64.exe加到防火墙 允许的应用(搜索允许。。。)


(不推荐使用System Proxy模式,如果用了的话:) bypass setting (在Clash app settings里面设置,不是配置文件!!)

12/17/2022

ssh disconnects after idle

 Change server /etc/ssh/sshd_config

ServerAliveInterval 15

ServerAliveCountMax 3


Setup OpenVPN server on AWS 翻墙

GFW可以很容易检测到OpenVPN,封锁端口,一般只能用一天就不能用了。所以这种办法还是不要用了。应该使用trojan:GitHub - trojan-gfw/trojan: An unidentifiable mechanism that helps you bypass GFW.

1. Find a region that's close to you. Launch an EC2 machine, search for an OpenVPN image from the market place. Choose the Bring Your Own License option

2. Mostly follow this site: How to create a free VPN server on AWS | by Israel Aminu | Towards Data Science

3. After you can login to the Admin page, make the following changes:

1) In the VPN Settings, Routing, Should VPN clients have access to private subnets (non-public networks on the server side)? -> Yes using Routing

2) DNS Settings, Have clients use specific DNS servers. Yes, Primary DNS Server->8.8.8.8, Secondary DNS Server->8.8.4.4

3) Change Server Network Settings, VPN Server | Hostname or IP Address: -> public IP address of the server 

 

4. Unlimited hack: ✔️ Remove restrictions from OpenVPN Access Server | RuCore.NET - English Version or https://drive.google.com/file/d/1Wp3h1VBJUY7eaLuUtMewbP1iS-tEGNbf/view?usp=sharing  

 

9/07/2021

Firefox: weird characters showing for some fonts on the SharePoint websites.

If the webpage shows weird characters for some icons with Firefox, it means some fonts couldn't be downloaded successfully. Use the following steps to fix:
Go into about:config and change network.http.referer.defaultPolicy and network.http.referer.defaultPolicy.pbmode from 2 ( strict-origin-when-cross-origin ) to 3 ( no-referrer-when-downgrade , used to be the old default ) 

Windows Virtual Desktop / Session / Workspace

 This program was made for people who are using Windows 10's built-in Virtual Desktops, but who don't like the default key-binding, don't like how you can't cycle through your desktops (If you are on your last one you don't want to hotkey over to the first one 8 times), and don't like not knowing what desktop # they are on.

https://github.com/m0ngr31/VirtualDesktopManager

8/19/2021

Grub loader set default to Windows boot manager

 If you have dual boot setup, one of the frustrating things that you'll immediately notice is that Ubuntu is now set as the default OS in the Grub loader. There is an easy way to switch back to using Windows as the default.

sudo emacs /etc/default/grub

Change: GRUB_DEFAULT=? (? is the 0-based index of the Grub menu)

sudo update-grub

This is for grub-mkconfig (GRUB) 2.02-2ubuntu8.23

Ubuntu 18.04

8/15/2021

Faststone Image Viewer Frequently Commonly Used Commands

 Alt+Left/Alt+Right: Move to the previous/next folder, or previous/next images.

1-9: Zoom the image to 100% ... 900%

=: Zoom in

-: Zoom out

i: Image property

x: Crop image

c: Copy to folder

m: Move to folder

d: Draw board

l: Rotate left

r: Rotate right

h: Flip horizontally

v: Flip vertically

w: Open Windows explorer