blog

  • About
  • About

Category: 其他

在ssh服务器上创建代理, 使所有流量经过ssh客户端

by admin/September 17, 2021/其他

使用场景: 一个的装有ssh服务端的服务器需要连接外网安装依赖, 但是 1. 服务器没有外网 2. 服务器所在局域网内的电脑没有外网或不方便设置成代理服务器 3. ssh客户端和服务器只有一个ssh端口可以连接 4. ssh客户端可以访问外网 以ssh服务器远程方式是ssh -p 11170 [email protected]为例, 要求本地和服务器都装有ssh服务端。 第一步: 在本地客户端执行, 将服务端2200端口映射到本地22端口 ssh -R 2200:localhost:22 -p 11170 [email protected] -N 第二步: 在服务端执行, 设置socks5代理, 监听端口是10800 ssh -D 10800 -p 2200 [email protected] -N 这时服务端就可以使用代理网络: curl –socks5 […]

linux:将目录里的软连接替换为原始文件

by admin/July 16, 2021/其他

for f in $(find . -maxdepth 5 -type l) do cp –remove-destination $(readlink -e $f) $f done

IntelliJ Idea: How to open project from the network share

by admin/July 1, 2021July 3, 2021/其他

just add a link…in windows cmd and open link folder mklink /D E:\mount “\\NetworkFolder”

Run batch file as a Windows service

by admin/June 9, 2021June 9, 2021/其他

NSSM is the Non-Sucking Service Manager to install service: nssm install “you service name” then a dialog will appear so you can choose where is the file you want to run. to remove nssm remove “you service name”

自建Pypi反向代理服务器

by admin/December 4, 2020September 10, 2021/其他

用于客户机器无法联网, 但是局域网内有其他电脑可以联网的情况下使用pip安装依赖包. 使用Nginx反向代理即可: server { listen 38888 default_server; index index.html index.htm index.nginx-debian.html; server_name _; location /simple { proxy_pass https://pypi.doubanio.com; } location /packages { proxy_pass https://pypi.doubanio.com; } } 安装时指定trusted-host, 比如: pip install requests -i http://ip:38888/simple –trusted-host=*

Allow All Content Security Policy

by admin/November 12, 2020November 27, 2020/其他

<meta http-equiv=”Content-Security-Policy” content=”default-src * data: blob: filesystem: about: ws: wss: ‘unsafe-inline’ ‘unsafe-eval’ ‘unsafe-dynamic’; script-src * data: blob: ‘unsafe-inline’ ‘unsafe-eval’; connect-src * data: blob: ‘unsafe-inline’; img-src * data: blob: ‘unsafe-inline’; frame-src * data: blob: ; style-src * data: blob: ‘unsafe-inline’; font-src […]

How to fetch all Git branches

by admin/August 26, 2020August 27, 2020/其他

for remote in `git branch -r`; do git branch –track ${remote#origin/} $remote; done

手动申请 Let’s Encrypt 泛域名证书

by admin/August 11, 2020August 12, 2020/其他

docker run -it –rm –name certbot -v $PWD:/etc/letsencrypt certbot/certbot certonly –manual –preferred-challenges=dns-01 –server=https://acme-v02.api.letsencrypt.org/directory 回车后按照提示输入 , 最后配置txt解析即可生成证书和密钥, 有效期三个月

A Desktop-Agnostic Way to Change DNS Server

by admin/July 26, 2020July 26, 2020/其他

Editing ‘/etc/parse.conf’ is not recommended any more because the content will be reset after restart. Open a terminal window and go to the Network Manager connections profile directory. cd /etc/NetworkManager/system-connections/ Then list connection names available on your system. ls As […]

Stop trying to use JWT unnecessarily

by admin/June 21, 2020June 23, 2020/其他

JWT is a very common authentication method. Some people say you should never use it, while others say it’s amazing. Today, I just want to talk about the disadvantages and why using JWT in web applications is not always a […]

Posts navigation

1 2 3 … 11

Recent Posts

  • 国外vps每月不到1美元(年付10.28 USD)
  • 基于python实现的内网穿透工具
  • mongo: 查看创建索引的进度
  • 2022年的我们, 有着怎样的集体记忆?[ 视频 ]
  • 三菱Fx485串口报文

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • December 2021
  • September 2021
  • July 2021
  • June 2021
  • December 2020
  • November 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • November 2018
  • September 2018
  • August 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • June 2017
  • May 2017
  • April 2017
  • April 2016
Proudly powered by WordPress | Theme: ShowMe by NEThemes.