ysl2 / blog Goto Github PK
View Code? Open in Web Editor NEWA simple blog for me.
License: MIT License
A simple blog for me.
License: MIT License
按照官网的教程来
https://gofrp.org/docs/examples/ssh/
注意公网服务器上面需要开放相应的端口
sdu_net 一旦检测到有 frp 行为,会直接封禁 ip。因此如果要用的话,需要做 tls 加密。而且就算采用了加密,也不知道能不能行,因为没法测试了,我的腾讯云的 ip 已经被封了。
可以采用外部 frp 嵌套内部 autossh 的方法。对于封禁 ip 的网段,采用 autossh 先连接到其他不封禁的网段。然后把不封禁的这台机器的对应端口用 frp 映射出去。比如 yin3 在 2244 端口用 autossh 映射了 server-53 的 22 端口,然后再找个公网机器用 frp 映射 yin3 的 2244 端口。这样在外部访问 frp 端口,就直接映射到了 server-53 的 22 端口,并且 server-53 对应的网段还检测不到。
# which sfrpc
# ~/.Local/bin/my/sfrp/sfrpc
# ln -s ~/.Local/bin/my/sfrp/sfrpc ~/.Local/bin/sfrpc
sfrpc -c ~/.Local/bin/my/sfrp/sfrpc.ini --natfrp_tls
准备
内网机器 A
公网机器 B
在公网主机 B 上配置/etc/ssh/sshd_config
文件,改以下字段为yes
,然后重启 ssh 服务
# 意思是监听端口可以绑定到任意其他ip
GatewayPorts yes
sudo systemctl restart sshd
在内网主机 A 上生成 ssh key,并对 B 做免密登录
ssh-keygen
ssh-copy-id [email protected]
在内网主机 A 上做端口映射(需要安装autossh
)
# autossh -M {本地主机端口} -NfR {公网主机端口}:localhost:22 {公网主机用户}@{公网ip}
autossh -M 10550 -NfR 9550:localhost:22 [email protected]
端口占用情况
开机自启
sudo vim /etc/rc.local
# 加入上面那行代码
autossh -M 10550 -NfR 9550:localhost:22 [email protected]
kill
方式一
应该先在内网主机A上,通过ps aux | grep autossh
找到autossh所在的PID,kill掉。
此时公网主机B上的9550和10550端口会自动断开。
然后再在内网主机A上通过lsof -i:9550
或者lsof -i:10550
找到对应PID,然后kill掉。
方式二 (可能不好用,并且可能只适用于学校屏蔽公网下内网穿透的情况)
在任意A或者B上,通过lsof -i:9550
或者lsof -i:10550
找到对应PID,然后kill掉。
此时另一个主机会自动断开。
需要:
ios设备,梯子环境,美区账号(地区在美国五个免税州内),支付宝,chatgpt账号
步骤:
ios设备,地区切换到美国,系统语言切换英文
美区账号下载chatgpt app
通过支付宝小程序给美区账号充值礼品卡
chatgpt app登录账号,通过美区账号充值gpt4
其他:
到这个链接中登录获取api key,然后部署到其他地方(但由于后面好像还要充值,没再继续部署)
图标的左右键功能不同。如果想unmount,需要在图标上点右键
把各个地方的blog全都迁移至此
flameshot &!
用以下命令查看所有在显卡上运行的进程。
但注意这种方法会打印所有卡上的进程,因此一旦kill,所有卡的都会停,非常危险,需要谨慎使用
fuser -v /dev/nvidia*
一种情况是手动给自己的账号添加的sudo,此时用下面这个:
vim /etc/sudoers
# 找到下面这一行
yusongli ALL=(ALL:ALL) ALL
# 改为:
yusongli ALL=(ALL:ALL) NOPASSWD:ALL
另一种情况是自己的账号默认就有sudo权限,此时应该用下面这个:
vim /etc/sudoers
# 找到下面这一行
%sudo ALL=(ALL:ALL) ALL
# 改为:
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.