mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-02 03:57:38 +03:00
fix: TestClientServerHookUDP
This commit is contained in:
parent
4e2f138008
commit
947701897b
1 changed files with 4 additions and 2 deletions
|
@ -132,7 +132,9 @@ func TestClientServerHookUDP(t *testing.T) {
|
|||
rData, rAddr, err := conn.Receive()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, sData, rData)
|
||||
assert.Equal(t, realEchoAddr, rAddr)
|
||||
// Hook address change is transparent,
|
||||
// the client should still see the fake echo address it sent packets to
|
||||
assert.Equal(t, fakeEchoAddr, rAddr)
|
||||
|
||||
// Subsequent packets should also be sent to the real echo server
|
||||
sData = []byte("never stop fighting")
|
||||
|
@ -141,5 +143,5 @@ func TestClientServerHookUDP(t *testing.T) {
|
|||
rData, rAddr, err = conn.Receive()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, sData, rData)
|
||||
assert.Equal(t, realEchoAddr, rAddr)
|
||||
assert.Equal(t, fakeEchoAddr, rAddr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue