choose up to 2 bridges from default list randomly
This commit is contained in:
parent
1dbe5eac55
commit
2a728140b4
|
@ -11,4 +11,4 @@ obfs4 104.131.108.182:56880 EF577C30B9F788B0E1801CF7E433B3B77792B77A cert=0SFhfD
|
||||||
obfs4 109.105.109.147:13764 BBB28DF0F201E706BE564EFE690FE9577DD8386D cert=KfMQN/tNMFdda61hMgpiMI7pbwU1T+wxjTulYnfw+4sgvG0zSH7N7fwT10BI8MUdAD7iJA iat-mode=0
|
obfs4 109.105.109.147:13764 BBB28DF0F201E706BE564EFE690FE9577DD8386D cert=KfMQN/tNMFdda61hMgpiMI7pbwU1T+wxjTulYnfw+4sgvG0zSH7N7fwT10BI8MUdAD7iJA iat-mode=0
|
||||||
meek 0.0.2.0:1 46D4A71197B8FA515A826C6B017C522FE264655B url=https://meek-reflect.appspot.com/ front=www.google.com
|
meek 0.0.2.0:1 46D4A71197B8FA515A826C6B017C522FE264655B url=https://meek-reflect.appspot.com/ front=www.google.com
|
||||||
meek 0.0.2.0:2 B9E7141C594AF25699E0079C1F0146F409495296 url=https://d2zfqthxsdq309.cloudfront.net/ front=a0.awsstatic.com
|
meek 0.0.2.0:2 B9E7141C594AF25699E0079C1F0146F409495296 url=https://d2zfqthxsdq309.cloudfront.net/ front=a0.awsstatic.com
|
||||||
meek 0.0.2.0:3 A2C13B7DFCAB1CBF3A884B6EB99A98067AB6EF44 url=https://az786092.vo.msecnd.net/ front=ajax.aspnetcdn.com
|
meek 0.0.2.0:3 A2C13B7DFCAB1CBF3A884B6EB99A98067AB6EF44 url=https://az786092.vo.msecnd.net/ front=ajax.aspnetcdn.com
|
|
@ -1410,15 +1410,26 @@ public class OrbotMainActivity extends AppCompatActivity
|
||||||
long seed = System.nanoTime();
|
long seed = System.nanoTime();
|
||||||
Collections.shuffle(alBridges, new Random(seed));
|
Collections.shuffle(alBridges, new Random(seed));
|
||||||
|
|
||||||
|
//let's just pull up to 2 bridges from the defaults at time
|
||||||
|
int maxBridges = 2;
|
||||||
|
int bridgeCount = 0;
|
||||||
|
|
||||||
//now go through the list to find the bridges we want
|
//now go through the list to find the bridges we want
|
||||||
for (Bridge b : alBridges)
|
for (Bridge b : alBridges)
|
||||||
{
|
{
|
||||||
if (b.type.equals(type))
|
if (b.type.equals(type))
|
||||||
{
|
{
|
||||||
|
|
||||||
sbConfig.append(b.type);
|
sbConfig.append(b.type);
|
||||||
sbConfig.append(' ');
|
sbConfig.append(' ');
|
||||||
sbConfig.append(b.config);
|
sbConfig.append(b.config);
|
||||||
sbConfig.append('\n');
|
|
||||||
|
bridgeCount++;
|
||||||
|
|
||||||
|
if (bridgeCount == maxBridges)
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
sbConfig.append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue