summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/Philipp15b/go-steam/servers.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/Philipp15b/go-steam/servers.go')
-rw-r--r--vendor/github.com/Philipp15b/go-steam/servers.go231
1 files changed, 106 insertions, 125 deletions
diff --git a/vendor/github.com/Philipp15b/go-steam/servers.go b/vendor/github.com/Philipp15b/go-steam/servers.go
index a0763d42..99db0a0d 100644
--- a/vendor/github.com/Philipp15b/go-steam/servers.go
+++ b/vendor/github.com/Philipp15b/go-steam/servers.go
@@ -8,135 +8,116 @@ import (
)
// CMServers contains a list of worlwide servers
-var CMServers = [][]string{
- { // North American Servers
- // Chicago
- "162.254.193.44:27018",
- "162.254.193.44:27019",
- "162.254.193.44:27020",
- "162.254.193.44:27021",
- "162.254.193.45:27017",
- "162.254.193.45:27018",
- "162.254.193.45:27019",
- "162.254.193.45:27021",
- "162.254.193.46:27017",
- "162.254.193.46:27018",
- "162.254.193.46:27019",
- "162.254.193.46:27020",
- "162.254.193.46:27021",
- "162.254.193.47:27019",
- "162.254.193.47:27020",
-
- // Ashburn
- "208.78.164.9:27017",
- "208.78.164.9:27018",
- "208.78.164.9:27019",
- "208.78.164.10:27017",
- "208.78.164.10:27018",
- "208.78.164.10:27019",
- "208.78.164.11:27017",
- "208.78.164.11:27018",
- "208.78.164.11:27019",
- "208.78.164.12:27017",
- "208.78.164.12:27018",
- "208.78.164.12:27019",
- "208.78.164.13:27017",
- "208.78.164.13:27018",
- "208.78.164.13:27019",
- "208.78.164.14:27017",
- "208.78.164.14:27018",
- "208.78.164.14:27019",
- },
- { // Europe Servers
- // Luxembourg
- "146.66.152.10:27017",
- "146.66.152.10:27018",
- "146.66.152.10:27019",
- "146.66.152.10:27020",
- "146.66.152.11:27017",
- "146.66.152.11:27018",
- "146.66.152.11:27019",
- "146.66.152.11:27020",
-
- // Poland
- "155.133.242.8:27017",
- "155.133.242.8:27018",
- "155.133.242.8:27019",
- "155.133.242.8:27020",
- "155.133.242.9:27017",
- "155.133.242.9:27018",
- "155.133.242.9:27019",
- "155.133.242.9:27020",
-
- // Vienna
- "146.66.155.8:27017",
- "146.66.155.8:27018",
- "146.66.155.8:27019",
- "146.66.155.8:27020",
- "185.25.182.10:27017",
- "185.25.182.10:27018",
- "185.25.182.10:27019",
- "185.25.182.10:27020",
-
- // London
- "162.254.196.40:27017",
- "162.254.196.40:27018",
- "162.254.196.40:27019",
- "162.254.196.40:27020",
- "162.254.196.40:27021",
- "162.254.196.41:27017",
- "162.254.196.41:27018",
- "162.254.196.41:27019",
- "162.254.196.41:27020",
- "162.254.196.41:27021",
- "162.254.196.42:27017",
- "162.254.196.42:27018",
- "162.254.196.42:27019",
- "162.254.196.42:27020",
- "162.254.196.42:27021",
- "162.254.196.43:27017",
- "162.254.196.43:27018",
- "162.254.196.43:27019",
- "162.254.196.43:27020",
- "162.254.196.43:27021",
-
- // Stockholm
- "185.25.180.14:27017",
- "185.25.180.14:27018",
- "185.25.180.14:27019",
- "185.25.180.14:27020",
- "185.25.180.15:27017",
- "185.25.180.15:27018",
- "185.25.180.15:27019",
- "185.25.180.15:27020",
- },
+var CMServers = []string{
+ "155.133.248.52:27018",
+ "162.254.197.40:27018",
+ "162.254.197.180:27019",
+ "155.133.248.50:27019",
+ "162.254.197.181:27017",
+ "162.254.197.42:27019",
+ "162.254.197.180:27017",
+ "162.254.197.181:27018",
+ "162.254.197.42:27018",
+ "155.133.248.50:27017",
+ "155.133.248.52:27019",
+ "155.133.248.51:27019",
+ "155.133.248.53:27019",
+ "155.133.248.51:27017",
+ "155.133.248.53:27017",
+ "155.133.248.52:27017",
+ "155.133.248.50:27018",
+ "162.254.197.180:27018",
+ "162.254.197.40:27017",
+ "162.254.197.40:27019",
+ "162.254.197.42:27017",
+ "162.254.197.181:27019",
+ "155.133.248.53:27018",
+ "155.133.248.51:27018",
+ "146.66.152.11:27017",
+ "146.66.152.10:27019",
+ "146.66.152.10:27017",
+ "146.66.152.10:27018",
+ "146.66.152.11:27019",
+ "162.254.198.133:27017",
+ "162.254.198.133:27018",
+ "162.254.198.130:27019",
+ "162.254.198.130:27017",
+ "162.254.198.132:27018",
+ "162.254.198.130:27018",
+ "162.254.198.132:27017",
+ "162.254.198.132:27019",
+ "162.254.198.131:27019",
+ "162.254.198.131:27017",
+ "146.66.152.11:27018",
+ "162.254.198.131:27018",
+ "162.254.198.133:27019",
+ "185.25.182.77:27017",
+ "185.25.182.76:27018",
+ "185.25.182.76:27019",
+ "185.25.182.77:27018",
+ "185.25.182.76:27017",
+ "185.25.182.77:27019",
+ "162.254.196.67:27019",
+ "162.254.196.67:27018",
+ "162.254.196.83:27018",
+ "162.254.196.84:27018",
+ "162.254.196.83:27017",
+ "162.254.196.84:27017",
+ "162.254.196.68:27019",
+ "162.254.196.68:27017",
+ "162.254.196.84:27019",
+ "162.254.196.67:27017",
+ "162.254.196.83:27019",
+ "162.254.196.68:27018",
+ "146.66.155.101:27017",
+ "146.66.155.101:27018",
+ "146.66.155.100:27017",
+ "146.66.155.100:27018",
+ "146.66.155.101:27019",
+ "146.66.155.100:27019",
+ "155.133.230.50:27017",
+ "155.133.230.34:27018",
+ "155.133.230.34:27017",
+ "155.133.230.50:27019",
+ "155.133.230.34:27019",
+ "155.133.230.50:27018",
+ "162.254.192.100:27017",
+ "162.254.192.108:27017",
+ "155.133.246.68:27017",
+ "155.133.246.68:27018",
+ "155.133.246.68:27019",
+ "155.133.246.69:27019",
+ "155.133.246.69:27017",
+ "155.133.246.69:27018",
+ "162.254.192.108:27018",
+ "162.254.192.101:27018",
+ "162.254.192.101:27019",
+ "162.254.192.109:27018",
+ "162.254.192.100:27018",
+ "162.254.192.109:27017",
+ "162.254.192.109:27019",
+ "162.254.192.108:27019",
+ "162.254.192.101:27017",
+ "162.254.192.100:27019",
+ "162.254.193.46:27019",
+ "162.254.193.6:27018",
+ "162.254.193.47:27018",
+ "162.254.193.6:27019",
+ "162.254.193.7:27018",
+ "162.254.193.7:27017",
+ "162.254.193.7:27019",
+ "162.254.193.47:27017",
+ "162.254.193.47:27019",
+ "162.254.193.46:27018",
}
-// GetRandomCM returns back a random server anywhere
+// GetRandomCM returns a random server from a built-in IP list.
+//
+// Prefer Client.Connect(), which uses IPs from the Steam Directory,
+// which is always more up-to-date.
func GetRandomCM() *netutil.PortAddr {
rng := rand.New(rand.NewSource(time.Now().UnixNano()))
- servers := append(CMServers[0], CMServers[1]...)
- addr := netutil.ParsePortAddr(servers[rng.Int31n(int32(len(servers)))])
- if addr == nil {
- panic("invalid address in CMServers slice")
- }
- return addr
-}
-
-// GetRandomNorthAmericaCM returns back a random server in north america
-func GetRandomNorthAmericaCM() *netutil.PortAddr {
- rng := rand.New(rand.NewSource(time.Now().UnixNano()))
- addr := netutil.ParsePortAddr(CMServers[0][rng.Int31n(int32(len(CMServers[0])))])
- if addr == nil {
- panic("invalid address in CMServers slice")
- }
- return addr
-}
-
-// GetRandomEuropeCM returns back a random server in europe
-func GetRandomEuropeCM() *netutil.PortAddr {
- rng := rand.New(rand.NewSource(time.Now().UnixNano()))
- addr := netutil.ParsePortAddr(CMServers[1][rng.Int31n(int32(len(CMServers[1])))])
+ addr := netutil.ParsePortAddr(CMServers[rng.Int31n(int32(len(CMServers)))])
if addr == nil {
panic("invalid address in CMServers slice")
}