一、缘起 想给小落同学加一些功能,但是小落同学买的是99元/年的阿里云ECS,配置很烂,基本上只能跑跑网页应用(还动不动内存不足,CPU超标)。 而我家里的电脑虽然是十年前的老电脑,至少有16G内存,比这个ECS强多了,因此想在这台电脑上部署一些服务,然后让这些服务通过ECS穿透到家里这台私网下的电脑,一方面让这台电脑可以继续发光发热,另一方面也可以再给小落同学加点功能特性。 二、缘倾FRP 晚上一个人在家没事,就去找了一下私网穿透的解决方案,Google出来一大堆,经筛选拟选用FRP来实现此需求。 FRP 是一个专注于内网穿透的高性能反向代理应用,支持 TCP、UDP、HTTP、HTTPS 等多种协议,可以将内网服务通过具有公网 IP 节点的中转暴露到公网。 FRP 项目地址:https://github.com/fatedier/frp 三、一些准备工作 小落同学所在的ECS安装的是Linux操作系统,而家里的电脑安装的则是Windows操作系统,因此需要将FRP服务端安装在Linux上,而FRP客户端则安装在Windows上。 1.配置ECS安全组 登录阿里云控制台,找到你的云服务器 ECS,并在该ECS的安全组里添加你需要放开的端口,暂定需要的端口区间为9000~9020。 2.配置ECS上的防火墙 需有公网 IP(阿里云ECS具备),开放所需端口。拟使用: 如果你用ufw 如果你用firewalld 3.下载FRP 程序 从 GitHub Releases 下载对应版本: SSH登陆上阿里云ECS,开始下载、安装、配置。 你可以直接在浏览器上下载,浏览器上输入下面这个地址即可。也可以命令行里用wget来下载。 注:如果你的windows没安装wget的话,可以到这里下载 https://eternallybored.org/misc/wget/ 将下载的 Windows 版本压缩包解压到任意目录(如e:\tools\utility\frp),目录中包含frpc.exe(客户端程序)和frpc.ini(配置文件)。 四、【成功】测试http配置 1.配置http 1)服务端配置 修改frps.toml如下: 2)客户端配置 修改frpc.toml如下: 2. 测试http模式 1)启动服务端 2)验证服务端控制台 访问 http://47.116.14.194:9020 输入面板用户名密码,能看到界面即启动成功。 3)启动客户端 […]
Utilities
Forwarded from: https://howdoesinternetwork.com/2016/quantum-key-distribution ——————————- QKD – Quantum key distribution is the magic part of quantum cryptography. Every other part of this new cryptography mechanism remains the same as in standard cryptography techniques currently used. By using quantum particles which behave under rules of quantum mechanics, keys can be generated and distributed to […]
I like this words: “There’s never a perfect time for anything—you just have go for it and keep your eyes on your goal.” Written by Anne Kreamer August 25, 2015 In the US, where only 11% of working engineers are women and fewer than 5% of the CEOs of the […]
This post’s goal is to guide a starter to analysis a crash by reading into the assemble code. But the example listed here is not a good one, because the crash point is not an obvious one, the real reason of the crash for this example is still remain uncovered. […]
Encountered an issue of extreme long time compiling days ago, so we tried to add a time cost output in the Makefile to locate what on earth happened during the compilation. There are two Makefiles need to be modified, one is Linux based Makefile, another is Android based Makefile Linux […]
The mechanism is simple like this: 1. Pull/Clone your own repository(which was forked from another repository) to a local PC. 2. Add remote source repository to a tag of the local copy. 3. Do local merge for the two repositories. 4. Resolve the conflications if exists. 5. Commit the local […]
GUID, Globally Unique Identifier, aka UUID(Universally Unique Identifier), is very useful when you need a global identifier in you program. GUID is a 128-bit integer number used to identify resources. The term GUID is generally used by developers working with Microsoft technologies, while UUID is used everywhere else.
As you know, there are LIMIT settings in Linux OS which may have something to do with some frequent-happen-issue. Such as stack size, open files, core file generation, etc. Here are some tips about ulimit, core, and some debugging tricks relevant. 1. ulimit comamnd —————————— To view your OS limitations, […]
Planning to write a series of posts about debugging & trouble shooting tricks. And I’d like to make backtrace as a start. As a typical programmer(AKA nerd), I’d like to jump to the topic directly before run into blah-blah. Everyone knows, bug is free, so it may be at everywhere, […]
In the last holiday (Oct 1), we dropped by ShaoXin on the way back to hometown, and paied a visit at Luxun Native Place. All I should say is: I finally saw a house which is called as Large families(大户人家), If you read a lot of LuXun’s Essays in your […]