1 { stdenv, lib, fetchFromGitHub, buildGoModule }:
7 src = fetchFromGitHub {
11 sha256 = "1mxgjvx99bz34f132827bqk56zgvh5rw3h2xmc524wvx59k9zj2a";
14 vendorSha256 = "1cgb957ipkiix3x0x84c77a1i8l679q3kqykm1lhb4f19x61dqjh";
17 substituteInPlace http2_test.go \
18 --replace "TestH2CForwardTunnel" "SkipH2CForwardTunnel" \
19 --replace "TestH2ForwardTunnel" "SkipH2ForwardTunnel"
21 substituteInPlace resolver_test.go \
22 --replace '{NameServer{Addr: "1.1.1.1"}, "github", true},' "" \
23 --replace '{NameServer{Addr: "1.1.1.1"}, "github.com", true},' "" \
24 --replace '{NameServer{Addr: "1.1.1.1:53"}, "github.com", true},' "" \
25 --replace '{NameServer{Addr: "1.1.1.1:53", Protocol: "tcp"}, "github.com", true},' "" \
26 --replace '{NameServer{Addr: "1.1.1.1:853", Protocol: "tls"}, "github.com", true},' "" \
27 --replace '{NameServer{Addr: "1.1.1.1:853", Protocol: "tls", Hostname: "cloudflare-dns.com"}, "github.com", true},' "" \
28 --replace '{NameServer{Addr: "https://cloudflare-dns.com/dns-query", Protocol: "https"}, "github.com", true},' "" \
29 --replace '{NameServer{Addr: "https://1.0.0.1/dns-query", Protocol: "https"}, "github.com", true},' ""
31 # Skip TestShadowTCP, TestShadowUDP: #70 #71 #72 #78 #83 #85 #86 #87 #93
32 substituteInPlace ss_test.go \
33 --replace '{url.User("xchacha20"), url.UserPassword("xchacha20", "123456"), false},' "" \
34 --replace '{url.UserPassword("xchacha20", "123456"), url.User("xchacha20"), false},' "" \
35 --replace '{url.UserPassword("xchacha20", "123456"), url.UserPassword("xchacha20", "abc"), false},' "" \
36 --replace '{url.UserPassword("CHACHA20-IETF-POLY1305", "123456"), url.UserPassword("CHACHA20-IETF-POLY1305", "123456"), true},' "" \
37 --replace '{url.UserPassword("AES-128-GCM", "123456"), url.UserPassword("AES-128-GCM", "123456"), true},' "" \
38 --replace '{url.User("AES-192-GCM"), url.UserPassword("AES-192-GCM", "123456"), false},' "" \
39 --replace '{url.UserPassword("AES-192-GCM", "123456"), url.User("AES-192-GCM"), false},' "" \
40 --replace '{url.UserPassword("AES-192-GCM", "123456"), url.UserPassword("AES-192-GCM", "abc"), false},' "" \
41 --replace '{url.UserPassword("AES-256-GCM", "123456"), url.UserPassword("AES-256-GCM", "123456"), true},' ""
45 broken = stdenv.isDarwin;
46 description = "A simple tunnel written in golang";
47 homepage = "https://github.com/ginuerzh/gost";
48 license = licenses.mit;
49 maintainers = with maintainers; [ pmy ];