-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
105 lines (103 loc) · 3.89 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package config
/*
Example client config:
{
"listen": [
{
"protocol": "http",
"address": "127.0.0.1:8080"
},
{
"protocol": "socks5",
"address": "127.0.0.1:1080"
}
],
"transport": [
{
"protocol": "grpc",
"address": "127.0.0.1:57175",
"cert_pem": [
"-----BEGIN CERTIFICATE-----",
"MIIBpTCCAUugAwIBAgIQe1Zbp3gjNDOOEkSHhxj8bzAKBggqhkjOPQQDAjAkMRAw",
"DgYDVQQKEwdBY21lIENvMRAwDgYDVQQDEwdSb290IENBMB4XDTI0MDUwNTA1NTA1",
"N1oXDTI1MDUwNTA1NTA1N1owEjEQMA4GA1UEChMHQWNtZSBDbzBZMBMGByqGSM49",
"AgEGCCqGSM49AwEHA0IABA12PefhEdmQAxlmePvbk/AqpmXJK/xWJTvNTOETAwPw",
"0s3y3SmL5HvDzc23AuI3Uz9L4tDFCdEUEe7/5wrIaZajcTBvMA4GA1UdDwEB/wQE",
"AwIHgDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIw",
"ADAfBgNVHSMEGDAWgBTviPZ9RNFHpPZ8L7QTwL+R3QIN0jAPBgNVHREECDAGhwR/",
"AAABMAoGCCqGSM49BAMCA0gAMEUCIGJFv+ZLpRUYf7ykxzcLDhhdJlYwlHhxymqE",
"50Snh2wSAiEA+zuGhElI1k28vfY5FkklWSFOI22h77l+aumgvCYA7OQ=",
"-----END CERTIFICATE-----"
],
"key_pem": [
"-----BEGIN EC PRIVATE KEY-----",
"MHcCAQEEIDyIMOnl42QQF91NEQ2yPzlbAEumBbTkHAiJ8PJhFFAvoAoGCCqGSM49",
"AwEHoUQDQgAEDXY95+ER2ZADGWZ4+9uT8CqmZckr/FYlO81M4RMDA/DSzfLdKYvk",
"e8PNzbcC4jdTP0vi0MUJ0RQR7v/nCshplg==",
"-----END EC PRIVATE KEY-----"
],
"ca_pem": [
"-----BEGIN CERTIFICATE-----",
"MIIBpjCCAU2gAwIBAgIQEDIIALqN2E+zXolhKvj4tzAKBggqhkjOPQQDAjAkMRAw",
"DgYDVQQKEwdBY21lIENvMRAwDgYDVQQDEwdSb290IENBMB4XDTI0MDUwNTA1NTA1",
"N1oXDTI1MDUwNTA1NTA1N1owJDEQMA4GA1UEChMHQWNtZSBDbzEQMA4GA1UEAxMH",
"Um9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMB+I04wFq604eLka9qX",
"gYD3x8U/T7ygVdpxU4AnBeVxDIj4zyXV82Tv6l55y4ahFuVy12G364hCzBCm+ToV",
"t6qjYTBfMA4GA1UdDwEB/wQEAwICBDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB",
"BQUHAwIwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU74j2fUTRR6T2fC+0E8C/",
"kd0CDdIwCgYIKoZIzj0EAwIDRwAwRAIgTPAhRXpSHij0+8NYXZmQkqrnkDIunzyX",
"bGZL5q1hfX8CIG548IPN7ONckoIF6etkZoODpAS3HZTNqdsm2bEeadg+",
"-----END CERTIFICATE-----"
]
},
{
"protocol": "ss",
"address": "example.com:54321",
"cipher": "aes-256-gcm",
"secret": "examplepass"
},
]
}
Example server config:
{
"listen": [
{
"protocol": "grpc",
"address": "0.0.0.0:57175",
"cert_pem": [
"-----BEGIN CERTIFICATE-----",
"MIIBpjCCAUygAwIBAgIRAPwPF9JOnkODrqOTFHSYpUcwCgYIKoZIzj0EAwIwJDEQ",
"MA4GA1UEChMHQWNtZSBDbzEQMA4GA1UEAxMHUm9vdCBDQTAeFw0yNDA1MDUwNTUw",
"NTdaFw0yNTA1MDUwNTUwNTdaMBIxEDAOBgNVBAoTB0FjbWUgQ28wWTATBgcqhkjO",
"PQIBBggqhkjOPQMBBwNCAARlir8qU6HqmHpk0p3Cqk8rnzlsRCuzuvIG0qWf7MCG",
"i3vw1PhSPtHnlhmJuhyO9PhSZW8TajBKPWfUfICuyrpzo3EwbzAOBgNVHQ8BAf8E",
"BAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQC",
"MAAwHwYDVR0jBBgwFoAU74j2fUTRR6T2fC+0E8C/kd0CDdIwDwYDVR0RBAgwBocE",
"fwAAATAKBggqhkjOPQQDAgNIADBFAiAuYEvA9VVOHqFnoIx4UHCgAcsGudvK+6pM",
"EackLCftdQIhAJBctDOK53qhN+g8B6PCIx8xiJliXDlNJyRikfdAumx5",
"-----END CERTIFICATE-----"
],
"key_pem": [
"-----BEGIN EC PRIVATE KEY-----",
"MHcCAQEEIMgxQ9SU7emgjjES/VPPjw5b90K4ARrBwaqrQLZIlmUMoAoGCCqGSM49",
"AwEHoUQDQgAEZYq/KlOh6ph6ZNKdwqpPK585bEQrs7ryBtKln+zAhot78NT4Uj7R",
"55YZibocjvT4UmVvE2owSj1n1HyArsq6cw==",
"-----END EC PRIVATE KEY-----"
],
"ca_pem": [
"-----BEGIN CERTIFICATE-----",
"MIIBpjCCAU2gAwIBAgIQEDIIALqN2E+zXolhKvj4tzAKBggqhkjOPQQDAjAkMRAw",
"DgYDVQQKEwdBY21lIENvMRAwDgYDVQQDEwdSb290IENBMB4XDTI0MDUwNTA1NTA1",
"N1oXDTI1MDUwNTA1NTA1N1owJDEQMA4GA1UEChMHQWNtZSBDbzEQMA4GA1UEAxMH",
"Um9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMB+I04wFq604eLka9qX",
"gYD3x8U/T7ygVdpxU4AnBeVxDIj4zyXV82Tv6l55y4ahFuVy12G364hCzBCm+ToV",
"t6qjYTBfMA4GA1UdDwEB/wQEAwICBDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB",
"BQUHAwIwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU74j2fUTRR6T2fC+0E8C/",
"kd0CDdIwCgYIKoZIzj0EAwIDRwAwRAIgTPAhRXpSHij0+8NYXZmQkqrnkDIunzyX",
"bGZL5q1hfX8CIG548IPN7ONckoIF6etkZoODpAS3HZTNqdsm2bEeadg+",
"-----END CERTIFICATE-----"
]
}
]
}
*/