mirror of
https://github.com/Alexey71/opera-proxy.git
synced 2026-05-13 14:11:00 +00:00
Merge pull request #112 from Snawoot/dp_export_respect_sni
Respect `-fake-SNI` option on DP config export
This commit is contained in:
@@ -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(),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user