Code Monkey home page Code Monkey logo

frpmodify's Introduction

frpModify

域前置与自删除

详情: FRP改造计划续

注:不管frpc用websocket还是wss,某云配置都为回源http。

frps

[common]
bind_port = 23333
token = uknowsec

frpc

[common]
server_addr = test.com.w.cdngslb.com
server_port = 443
token = uknowsec
protocol = wss
#protocol = websocket
tls_enable = true
del_enable = true
websocket_domain = test.com

[http_proxy]
type = tcp
remote_port = 10002
plugin = socks5

指定参数

>frpc.exe -t 1.1.1.1 -p 2333
Modify by Uknow
Configure frps.ini As follows

        [common]
        bind_port = 2333
        token = uknowsec

2020/06/21 10:25:57 [I] [service.go:282] [08156671a10a3d42] login to server success, get run id [08156671a10a3d42], server udp port [0]
2020/06/21 10:25:57 [I] [proxy_manager.go:144] [08156671a10a3d42] proxy added: [http_proxy]
2020/06/21 10:25:57 [I] [control.go:179] [08156671a10a3d42] [http_proxy] start proxy success

详情: FRP改造计划

frpc.ini

[common]
server_addr = 0.0.0.0
server_port = 2333
token = uknowsec
tls_enable = true
[http_proxy]
type = tcp
remote_port = 23333
plugin = socks5

frps.ini

[common]
bind_port = 2333
token = uknowsec

frpmodify's People

Contributors

uknowsec 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

frpmodify's Issues

你好,感谢您编译的frp软件,我在接入(支持ws)cdn后不能链接情况,可否帮忙看下

情况一

1.将frps的配置改为bind_port = 80可以接通,但是不能远程

frps配置

[common]
bind_port = 80
token = uknowsec

frpc配置

[common]
server_addr = remote.abc.com.cdn.dnsv1.com #对应的CNAME
server_port = 80
token = uknowsec
protocol = websocket
tls_enable = true
#del_enable = true
websocket_domain = remote.abc.com #为加速域名

[RDP]
local_ip = 127.0.0.1
remote_port = 7001
local_port = 3389

服务器日志如下

021/05/30 12:08:45 [I] [root.go:108] frps uses config file: c.ini
2021/05/30 12:08:45 [I] [service.go:190] frps tcp listen on 0.0.0.0:80
2021/05/30 12:08:45 [I] [root.go:217] frps started successfully
2021/05/30 12:08:52 [I] [service.go:444] [8ff89e9c6aa0a22c] client login info: ip [http://remote.abc.com.cdn.dnsv1.com:80] version [0.34.3] hostname [] os [windows] arch [amd64]
2021/05/30 12:08:52 [I] [tcp.go:63] [8ff89e9c6aa0a22c] [RDP] tcp proxy listen port [7001]
2021/05/30 12:08:52 [I] [control.go:446] [8ff89e9c6aa0a22c] new proxy [RDP] success

RDP链接地址remote.abc.com:7001
不能链接

情况二

参照说明修改了端口为7000
2.如果改为bind_port = 7000
frps配置

[common]
bind_port = 7000
token = uknowsec

frpc配置

[common]
server_addr = remote.abc.com.cdn.dnsv1.com #对应的CNAME
server_port = 80
token = uknowsec
protocol = websocket
tls_enable = true
#del_enable = true
websocket_domain = remote.abc.com #为加速域名

[RDP]
local_ip = 127.0.0.1
remote_port = 7001
local_port = 3389

运行后出现

frp to support Domain fronting
Modified by Uknow
2021/05/30 12:22:36 [W] [service.go:103] login to server failed: websocket.Dial
ws://remote.abc.com.cdn.dnsv1.com:80/websocket: read tcp 192.168.110.200:50
073->139.170.157.185:80: wsarecv: An existing connection was forcibly closed by
the remote host.
websocket.Dial ws://remote.abc.com.cdn.dnsv1.com:80/websocket: read tcp 192
.168.110.200:50073->139.170.157.185:80: wsarecv: An existing connection was forc
ibly closed by the remote host.

抓包结果

GET /websocket HTTP/1.1
Host: remote.abc.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: 2Z3ByJtF6NYGXTYaAEJr3A==
Origin: http://remote.abc.com.cdn.dnsv1.com:80
Sec-WebSocket-Version: 13

依旧还是不行

请教下如何配置才能使用呢
再次感谢!

求修改后的源码

师傅方便给一份修改后的源码吗 自行按照文章修改后出现了很多报错 想学习一下 麻烦师傅了

使用阿里云C2时,报错websocket: bad status

使用阿里云CDN时,报错[W] [service.go:103] login to server failed: websocket.Dial ws://61.240.227.243:80/websocket: bad status
frps端配置:
image

frpc端配置:
image

无法连接,尝试把server_addr 改为cdn_ip也是同样的报错。

cdn连通性证明:
image

且使用nc 可以接受到数据:
image

看起来是因为阿里云cdn把下面两个websocket的需要的header吞掉了

Upgrade: websocket
Connection: Upgrade

有什么解决办法嘛?师傅测试时用的什么厂商的cdn?

另外

我根据你的文章修改时,把验证Upgrade、Connection去掉后,还是会报错,但IP直连是可以的
下图看起来阿里云CDN好像不直接支持websocket?
frps端:
image

frpc端:
image
image

wireshark抓包记录
image

师傅是怎么用cdn保持websocket连接的?

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.