diff --git a/.travis.yml b/.travis.yml index e4e7b556..01842466 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ language: go go: - 1.7 -sudo: required - git: depth: 5 diff --git a/transport/internet/udp/hub_linux_test.go b/transport/internet/udp/hub_linux_test.go index 96e83f87..43003774 100644 --- a/transport/internet/udp/hub_linux_test.go +++ b/transport/internet/udp/hub_linux_test.go @@ -3,6 +3,7 @@ package udp_test import ( + "os" "syscall" "testing" @@ -16,6 +17,10 @@ import ( func TestHubSocksOption(t *testing.T) { assert := assert.On(t) + if os.Geteuid() != 0 { + // This test case requires root permission. + return + } hub, err := ListenUDP(v2net.LocalHostIP, v2net.Port(0), ListenOption{ Callback: func(*alloc.Buffer, *proxy.SessionInfo) {},