mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
feat: support sudp proxy (#1730)
This commit is contained in:
@@ -72,6 +72,12 @@ local_port = 10701
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
|
||||
[sudp]
|
||||
type = sudp
|
||||
sk = abcdefg
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10702
|
||||
|
||||
[web01]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
|
||||
@@ -23,3 +23,12 @@ bind_addr = 127.0.0.1
|
||||
bind_port = 10905
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
|
||||
|
||||
[sudp_visitor]
|
||||
type = sudp
|
||||
role = visitor
|
||||
server_name = sudp
|
||||
sk = abcdefg
|
||||
bind_addr = 127.0.0.1
|
||||
bind_port = 10816
|
||||
|
||||
@@ -118,6 +118,16 @@ func TestStcp(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSudp(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
// Normal
|
||||
addr := fmt.Sprintf("127.0.0.1:%d", consts.TEST_SUDP_FRP_PORT)
|
||||
res, err := util.SendUdpMsg(addr, consts.TEST_SUDP_ECHO_STR)
|
||||
|
||||
assert.NoError(err)
|
||||
assert.Equal(consts.TEST_SUDP_ECHO_STR, res)
|
||||
}
|
||||
|
||||
func TestHttp(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
// web01
|
||||
|
||||
Reference in New Issue
Block a user