Giter Site home page Giter Site logo

editso / fuso Goto Github PK

View Code? Open in Web Editor NEW
1.7K 23.0 183.0 8.07 MB

一款体积小, 快速, 稳定, 高效, 轻量的内网穿透, 端口转发工具 支持多连接,级联代理,传输加密 (A small volume, fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption)

License: GNU General Public License v3.0

Rust 99.95% Shell 0.05%
forward proxy rust async socks5 nat bridge kcp penetrate smol

fuso's Introduction

Fuso : 扶桑

A fast, stable, cross-platform and efficient intranet penetration and port forwarding tool

一款 快速 稳定 跨平台 高效的内网穿透,端口转发工具

Author Daza Daza Bin GitHub issues Github Stars GitHub forks GitHub license Downloads

待完善

  1. webhook
  2. web管理面板
  3. 正向代理
  4. 流转发
  5. 文档修正

快速开始

  1. 下载fuso

  2. 解压,得到 fus,fuc两个程序, 将fus上传到你的服务器, 将fuc放到你需要穿透的电脑上 image

  3. 在你的服务器上启动fus 如下图,则表示服务端启动成功
    image

    1. 默认情况下,服务端监听6722端口
  4. 在你需要穿透的电脑上启动fuc 如下图, 则表示客户端启动成功 image

    1. 默认情况下,将转发到127.0.0.1:80, 访问端口将随机分配
  5. 此时访问127.0.0.1:60974即可, 注意: 你的80端口必须有服务在运行

使用说明

1. 端口转发
fuc --forward-host xxx.xxx.xxx.xxx --forward-port
   --forward-host: 转发到的地址
   --forward-port: 转发到的端口
   如: 转发流量到内网 10.10.10.4:3389
   > fuc --forward-host 10.10.10.4 --forward-port 3389

2. socks5:
fuc --socks --su --s5p xxx --s5u xxx
   --su: 可选的, 开启udp转发, 
   --s5p: 可选的, 认证密码, 默认不进行密码认证
   --s5u 可选的, 认证账号, 默认账号 anonymous
   --socks: 可选的, 开启socks5代理, 未指定--su的情况下不会转发udp
   如: 开启udp转发与密码认证
   > fuc --socks --su --s5p 123 --s5u socks
   此时, 已开启udp转发,连接密码为 "123",账号为 "socks"

3. 指定穿透成功时访问的端口
   fuc -b xxxx
   -b | --visit-bind-port: 可选的, 默认随机分配
   如: 访问外网端口 8888 转发到内网 80
   > fuc --forward-port 80 -b 8888
   
4. 桥接模式 注意: 目前不能转发udp
   fuc --bridge-listen xxxx --bridge-port xxx 
   --bridge-listen | --bl: 监听地址, 默认 127.0.0.1
   --bridge-port | --bp: 监听端口, 默认不启用桥接
   如: 开始桥接模式,并监听在9999端口, 本机ip地址为: 10.10.10.2
   > fuc --bridge-listen 0.0.0.0 --bridge-port 9999 # 开启桥接
   > fuc 10.10.10.2 9999 # 建立连接

   级联: 
   > fuc --bridge-listen 0.0.0.0 --bridge-port 9999 # 第一级, IP: 10.10.10.2
    > fuc --bridge-listen 0.0.0.0 --bridge-port 9991  10.10.10.2 9999 # 第二级, IP: 10.10.10.3
     > fuc 10.10.10.3 9991 # 最终 

5. 将连接信息通知到 Telegram 或其他
   fus --observer "program:[arguments]"
   --observer: 建立连接或断开连接时的钩子
   如: 使用bash脚本将连接信息通知到tg
   > fus --observer "/bin/bash:[telegram.sh]"

6. 指定客户端与服务端通信的端口
   fuc --channel-port 8888 ...
   --channel-port: 可选的, 客户端与服务端通信端口, 默认随机

Demo

Demo

Features

Name ✔(Achieved) / ❌(Unrealized))
基本转发
传输加密
socks5
socks5 udp 转发
kcp 支持
多映射
级联代理
数据传输压缩
websocket
Rsa加密
Aes加密

External

注意

  • 本项目所用技术仅用于学习交流请勿直接用于任何商业场合和非法用途

fuso's People

Contributors

b1eed avatar editso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuso's Issues

请问支持正向socks功能吗?

比如 如下情况:
B 机器不出网,A 机器播 VPN--->B,A 能 ping 通B,但 B 不能 ping 通 A,在 B 上开启监听端口,A 正向来连 B 建立正向 socks,不同以往的出网反向socks。
类似于 msf 的 bind_shell 上线。

无公网IP服务器通过转发所有流量到有公网IP服务器来访问公网

具体表述:
有两台服务器,服务器A有公网IP,服务器B没有,
目前服务商(联通云)限制无公网IP的服务器的外网访问,
是否可以通过 fuso 内网穿透,转发服务器B的流量到A来解决这个问题,同时服务器A上也有一些服务在跑,不能影响现有服务
扩展一下,如果加了服务器C同样无公网IP要如何处理?
(目前服务器都需要格外购买NAT才能比较方便地处理这个情况,我们搞公益的想省钱...)

功能扩展提议

格式:

  1. 需要扩展的功能大致描述
  2. 为什么需要这个功能

大佬 fuso 如何像frp一样配置socks5

服务端 fus -l 0.0.0.0 -p 39123
内网的客户端
fuc.exe --socks 服务端IP 39123
结果显示
[2022-08-14T05:23:08.833Z INFO ] the server listens on [::39123] T
[2022-08-14T05:27:34.008Z INFO ] client is xxxx:3543 T and the server is [::42348] T
[2022-08-14T05:27:34.008Z INFO ] please visit [::39465] T for port mapping
[2022-08-14T05:41:21.563Z INFO ] client is 222.187.86.50:3866 T and the server is [::40135] T
[2022-08-14T05:41:21.563Z INFO ] please visit [::44463] T for port mapping
[2022-08-14T05:41:26.217Z WARN ] client error Connection reset by peer (os error 104)
[2022-08-14T05:41:26.217Z WARN ] client error xxxx:3543 T, err: Connection reset by peer (os error 104)
[2022-08-14T05:41:26.217Z WARN ] An error occurred Connection reset by peer (os error 104)
[2022-08-14T05:41:26.217Z WARN ] stop processing

我挂 服务器ip:44463 这个端口 无法成功 这个是像frp一样的么?

external IP forward

The fuso server will take the external IP of the connected player and transfer it to the fuso client so that the players have the correct IP on the Minecraft game server

The function will be useful for game servers\various sites

server Aborted (core dumped)

server log
[2022-10-05T13:37:06.528Z INFO ] the server listens on [::6722] T
[2022-10-05T13:37:10.953Z INFO ] client is 127.0.0.1:6001 T and the server is [::36265] T
[2022-10-05T13:37:10.953Z INFO ] please visit [::3389] T for port mapping
memory allocation of 4230021168 bytes failed
Aborted (core dumped)

大佬 fuso 怎么配置socks5 一直没成功

服务端 fus -l 0.0.0.0 -p 39123
内网的客户端
fuc.exe --socks 服务端IP 39123
结果显示
[2022-08-14T05:23:08.833Z INFO ] the server listens on [::39123] T
[2022-08-14T05:27:34.008Z INFO ] client is xxxx:3543 T and the server is [::42348] T
[2022-08-14T05:27:34.008Z INFO ] please visit [::39465] T for port mapping
[2022-08-14T05:41:21.563Z INFO ] client is 222.187.86.50:3866 T and the server is [::40135] T
[2022-08-14T05:41:21.563Z INFO ] please visit [::44463] T for port mapping
[2022-08-14T05:41:26.217Z WARN ] client error Connection reset by peer (os error 104)
[2022-08-14T05:41:26.217Z WARN ] client error xxxx:3543 T, err: Connection reset by peer (os error 104)
[2022-08-14T05:41:26.217Z WARN ] An error occurred Connection reset by peer (os error 104)
[2022-08-14T05:41:26.217Z WARN ] stop processing

我挂 服务器ip:44463 这个端口 无法成功 这个是像frp一样的么?

will you add tcp-fast-open?

TCP Fast Open (TFO), is an extension to the transmission control protocol (TCP) that helps reduce network latency by enabling data to be exchanged during the sender's initial TCP SYN. A traditional TCP handshake is a three step process that is carried out as follows.

The sender sends a SYN packet to the receiver to initiate the connection
The receiver sends a SYN-ACK packet back to the sender to let it know that it is ready to start transmitting data
The sender sends an ACK packet to the receiver
https://www.keycdn.com/support/tcp-fast-open

will you add proxy-protocol support?

in order to be able to get normal IP addresses to the minecraft server.
in order for the server to be able to receive external IP addresses of players.
by the way, nginx supports proxy_protocol (https://imgbb.com/FnpFhPk), will you introduce such functionality in fuso?

级联代理

请问如何设置2层、三层或更多层次的socks5代理呢?

流量加密模块用户可以自定义

看了下加密模块,用的异或运算,虽然可以自定义异或的key,但是特征过于明显
image

是不是可以开放一个自定义加解密方式的API和文档。

repo request

Would it be possible for you to make separated github posts for the socks5 server and socks5 client so they are independent and less confusing when trying to make the socks server only

增加连接时可选密钥校验

在文档中似乎没有看到跟秘钥相关的内容,感觉似乎不太安全?

在一台具有公网IP的服务器上启动 fus ,并且对外开放了 6722 端口。如果不小心泄露了 IP 和端口,或者被恶意扫描出了这个端口,那么任何人都可以通过 fuc 连接这台服务器的 fus ,并且指定端口来使用内网穿透。

如果这可行的话,一些奇怪的网站可以指定服务器的 80 端口(假设服务器未使用该端口),然后外网访问该 IP 就直接访问到网站,服务器拥有者莫名其妙就背锅了……

支持域名前置的代理

现在客户端跟服务端的通信用的是xor加密的tcp连接,李哥说将来打算支持kcp协议。

是否可以支持https或者wss通讯,并且host可以用户自定义,这样就可以使用cdn 进行域名前置了。隐藏真实服务端的ip。
image
image

frp可以实现,参考这个https://buaq.net/go-52132.html

socks5代理不稳定,一段时间后断连

出现以下错误
image

[2023-07-12T08:18:28.641Z WARN ] client mapping failed, msg = 向一个无法连接的网络尝试了一个套接字操作。 (os error 10051)
[2023-07-12T08:18:28.886Z WARN ] client mapping failed, msg = 向一个无法连接的网络尝试了一个套接字操作。 (os error 10051)
[2023-07-12T08:18:29.128Z WARN ] client mapping failed, msg = 向一个无法连接的网络尝试了一个套接字操作。 (os error 10051)
[2023-07-12T08:18:29.372Z WARN ] client mapping failed, msg = 向一个无法连接的网络尝试了一个套接字操作。 (os error 10051)
memory allocation of 4150904833 bytes failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.