mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Updated proxyType variable name for readability
This commit is contained in:
parent
981abffbd9
commit
97554e03e4
5 changed files with 30 additions and 30 deletions
|
@ -110,20 +110,20 @@ func (s CountryStats) Display() string {
|
|||
return output
|
||||
}
|
||||
|
||||
func (m *Metrics) UpdateCountryStats(addr string, ptype string) {
|
||||
func (m *Metrics) UpdateCountryStats(addr string, proxyType string) {
|
||||
|
||||
var country string
|
||||
var ok bool
|
||||
|
||||
if ptype == "standalone" {
|
||||
if proxyType == "standalone" {
|
||||
if m.countryStats.standalone[addr] {
|
||||
return
|
||||
}
|
||||
} else if ptype == "badge" {
|
||||
} else if proxyType == "badge" {
|
||||
if m.countryStats.badge[addr] {
|
||||
return
|
||||
}
|
||||
} else if ptype == "webext" {
|
||||
} else if proxyType == "webext" {
|
||||
if m.countryStats.webext[addr] {
|
||||
return
|
||||
}
|
||||
|
@ -153,11 +153,11 @@ func (m *Metrics) UpdateCountryStats(addr string, ptype string) {
|
|||
|
||||
//update map of unique ips and counts
|
||||
m.countryStats.counts[country]++
|
||||
if ptype == "standalone" {
|
||||
if proxyType == "standalone" {
|
||||
m.countryStats.standalone[addr] = true
|
||||
} else if ptype == "badge" {
|
||||
} else if proxyType == "badge" {
|
||||
m.countryStats.badge[addr] = true
|
||||
} else if ptype == "webext" {
|
||||
} else if proxyType == "webext" {
|
||||
m.countryStats.webext[addr] = true
|
||||
} else {
|
||||
m.countryStats.unknown[addr] = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue