Skip to content

Commit 9ae60da

Browse files
authored
Merge pull request #228 from sxci/static_autozone
add httpAutoZone httpsAutoZone [ci skip]
2 parents 9c47fb7 + 62445b8 commit 9ae60da

File tree

1 file changed

+24
-0
lines changed
  • library/src/main/java/com/qiniu/android/common

1 file changed

+24
-0
lines changed

library/src/main/java/com/qiniu/android/common/Zone.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,42 @@
66
* Created by bailong on 15/10/10.
77
*/
88
public abstract class Zone {
9+
10+
/**
11+
* 华东机房, http
12+
* */
913
public static final Zone zone0 =
1014
createZone("upload.qiniu.com", "up.qiniu.com", "183.136.139.10", "115.231.182.136");
1115

16+
/**
17+
* 华北机房, http
18+
* */
1219
public static final Zone zone1 =
1320
createZone("upload-z1.qiniu.com", "up-z1.qiniu.com", "106.38.227.27", "106.38.227.28");
1421

22+
/**
23+
* 华南机房, http
24+
* */
1525
public static final Zone zone2 =
1626
createZone("upload-z2.qiniu.com", "up-z2.qiniu.com", "183.60.214.197", "14.152.37.7");
1727

28+
/**
29+
* 北美机房, http
30+
* */
1831
public static final Zone zoneNa0 =
1932
createZone("upload-na0.qiniu.com", "up-na0.qiniu.com", "23.236.102.3", "23.236.102.2");
2033

34+
/**
35+
* 自动判断机房, http
36+
* */
37+
public static final AutoZone httpAutoZone = new AutoZone(false, null);
38+
39+
/**
40+
* 自动判断机房, https
41+
* */
42+
public static final AutoZone httpsAutoZone = new AutoZone(true, null);
43+
44+
2145
private static Zone createZone(String upHost, String upHostBackup, String upIp, String upIp2) {
2246
String[] upIps = {upIp, upIp2};
2347
ServiceAddress up = new ServiceAddress("http://" + upHost, upIps);

0 commit comments

Comments
 (0)