Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chisel 隧道工具 #192

Open
vislee opened this issue Apr 26, 2023 · 0 comments
Open

chisel 隧道工具 #192

vislee opened this issue Apr 26, 2023 · 0 comments

Comments

@vislee
Copy link
Owner

vislee commented Apr 26, 2023

概述

chisel go编写的隧道工具,支持tcp/udp。 官方介绍是“a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.”

编译后只有一个chisel,同时支持客户端和服务端。

chisel -h

  Usage: chisel [command] [--help]

  Version: 0.0.0-src (go1.19.6)

  Commands:
    server - runs chisel in server mode
    client - runs chisel in client mode

  Read more:
    https://github.com/jpillora/chisel

使用

sock5内网穿透

  1. 一台有公网IP的主机。
  2. 内网可以出工网的主机。

公网IP(x.x.x.65)的机器:
./chisel server -p 8909 --reverse
内网机器:
./chisel client x.x.x.65:8909 R:socks

当有客户端连接到服务端时,服务端会生成一个新的会话: session#1: tun: proxy#R:127.0.0.1:1080=>socks: Listening
当在公网这台服务器通过 curl -v http://127.0.0.1:1081/ --socks5 127.0.0.1:1080 访问127.0.0.1:1081时,和你在内网机器访问127.0.0.1:1081一样。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant