当前位置:网站首页>Sockfwd a data forwarding gadget
Sockfwd a data forwarding gadget
2022-06-24 01:05:00 【Robert Lu】
Recently in to see containerd Code for , When I tried it, I found that it was listening to unix socket, No external access containerd.
What I want to verify is whether I can access... From the remote containerd、 management containerd The container of , So you need a remote access unix socket Tools for .
I searched the Internet , There is no ready-made implementation , I wrote it myself sockfwd.
usage
Usage: sockfwd [flags] Flags: -d, --destination string Destination address , That is, the address to forward to -s, --source string source address , That is, the address to receive the request -q, --quiet silent mode
Example
Local containerd The instance is exposed to the network :
./sockfwd -s tcp://127.0.0.1:8090 -d unix:///var/run/containerd.sock
Local 127.0.0.1:8080 Port exposed to 0.0.0.0:8090 On port :
./sockfwd -s tcp://127.0.0.1:8090 -d unix://127.0.0.1:8090
Expose local services to the network , Special attention should be paid to whether there are potential safety hazards !
Other thoughts
I've been writing about golang, It is found that if it is only dealing with the data surface ,golang Provided goroute add channel Can handle data forwarding very gracefully , For example, this article is written sockfwd.
But if it involves control , For example, complex state management , Information across threads /goroute Sync , that channel Your abstract ability is still not enough , A lot of extra code needs to be written .
The follow-up plan
You can add support tls Authentication to forward data more securely .
边栏推荐
- [CVPR 2020 oral] a physics based noise formation model for extreme low light raw denoising
- [technique of planting grass] spit blood and clean up, and take you to collect goose feathers in a fancy way! Do not spread!!!
- [applet] realize the effect of double column commodities
- An accident caused by a MySQL misoperation, and the "high availability" cannot withstand it!
- 实时计算框架:Flink集群搭建与运行机制
- [shutter] how to use shutter packages and plug-ins
- Cvpr2022 𞓜 thin domain adaptation
- Solve the problem that Base64 compressed files are extracted with spaces after post request
- WinSCP和PuTTY的安装和使用
- How to write peer-reviewed papers
猜你喜欢

Shardingsphere-proxy-5.0.0 implementation of capacity range partition (V)

飞桨产业级开源模型库:加速企业AI任务开发与应用

What problems need to be solved by MES management system in the era of intelligent manufacturing

利用Scanorama高效整合异质单细胞转录组

实时计算框架:Spark集群搭建与入门案例

JS input / output statements, variables

跨域和JSONP

【小程序】实现双列商品效果

Alibaba interview question: multi thread related

Arm learning (7) symbol table and debugging
随机推荐
Mip-NeRF:抗混叠的多尺度神经辐射场ICCV2021
13 `bs_duixiang.tag标签`得到一个tag对象
985 Android programmers won the oral offer of Alibaba P6 in 40 days. After the successful interview, they sorted out these interview ideas
Shardingsphere-proxy-5.0.0 implementation of capacity range partition (V)
Building a digital software factory -- panoramic interpretation of one-stop Devops platform
Longest substring without duplicate characters
LSF打开Job idle information以看job的cpu time/elapse time使用情况
Skywalking installation and deployment practice
ARM学习(7) symbol 符号表以及调试
Installation and use of winscp and putty
持续测试和质量保障的关系
现在网上开股票账户安全吗?选择国有券商,最快8分钟开户成功
Delegation attack of Intranet penetration and lateral mobility
对抗训练理论分析:自适应步长快速对抗训练
【小程序】编译预览小程序时,出现-80063错误提示
飞桨产业级开源模型库:加速企业AI任务开发与应用
How to write peer-reviewed papers
Apple iphone14 is equipped with Beidou navigation system. What are the advantages of Beidou vs GPS?
Efficient integration of heterogeneous single cell transcriptome with scanorama
Is it safe to open a stock account online now? Select a state-owned securities firm, and the fastest time to open an account is 8 minutes