respect -fake-SNI option on DP config export

This commit is contained in:
Vladislav Yarmak
2025-11-20 01:33:12 +02:00
parent fa9621cd33
commit 1ba80e7bad
+3 -3
View File
@@ -362,7 +362,7 @@ func run() int {
return printProxies(ips, seclient) return printProxies(ips, seclient)
} }
if args.dpExport { if args.dpExport {
return dpExport(ips, seclient) return dpExport(ips, seclient, args.fakeSNI)
} }
} }
@@ -522,7 +522,7 @@ func printProxies(ips []se.SEIPEntry, seclient *se.SEClient) int {
return 0 return 0
} }
func dpExport(ips []se.SEIPEntry, seclient *se.SEClient) int { func dpExport(ips []se.SEIPEntry, seclient *se.SEClient, sni string) int {
wr := csv.NewWriter(os.Stdout) wr := csv.NewWriter(os.Stdout)
wr.Comma = ' ' wr.Comma = ' '
defer wr.Flush() defer wr.Flush()
@@ -540,7 +540,7 @@ func dpExport(ips []se.SEIPEntry, seclient *se.SEClient) int {
strconv.Itoa(int(ip.Ports[0])), strconv.Itoa(int(ip.Ports[0])),
), ),
RawQuery: url.Values{ RawQuery: url.Values{
"sni": []string{""}, "sni": []string{sni},
"peername": []string{fmt.Sprintf("%s%d.%s", strings.ToLower(ip.Geo.CountryCode), i, PROXY_SUFFIX)}, "peername": []string{fmt.Sprintf("%s%d.%s", strings.ToLower(ip.Geo.CountryCode), i, PROXY_SUFFIX)},
}.Encode(), }.Encode(),
} }