diff --git a/orbotservice/src/main/assets/fronts b/orbotservice/src/main/assets/fronts index 6cafa57b4..f31c31dc8 100644 --- a/orbotservice/src/main/assets/fronts +++ b/orbotservice/src/main/assets/fronts @@ -1,6 +1,9 @@ snowflake-target https://snowflake-broker.torproject.net.global.prod.fastly.net/ snowflake-front cdn.sstatic.net -snowflake-stun stun:stun.stunprotocol.org:3478 +snowflake-stun stun:stun.l.google.com:19302,stun:stun.voip.blackberry.com:3478,stun:stun.altar.com.pl:3478,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.sonetel.net:3478,stun:stun.stunprotocol.org:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 moat-cdn https://d50gd378qj74g.cloudfront.net/ moat-url https://moat.torproject.org.global.prod.fastly.net/ -moat-front cdn.sstatic.net \ No newline at end of file +moat-front cdn.sstatic.net +snowflake-amp-target https://snowflake-broker.torproject.net/ +snowflake-amp-front www.google.com +snowflake-amp-cache https://cdn.ampproject.org/ \ No newline at end of file diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java index 589246a80..afa82933f 100644 --- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java +++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java @@ -332,18 +332,38 @@ private void startSnowflakeClientDomainFronting() { //this is using the current, default Tor snowflake infrastructure var target = getCdnFront("snowflake-target"); var front = getCdnFront("snowflake-front"); - var stunServer = getCdnFront("snowflake-stun"); + var stunServers = getCdnFront("snowflake-stun"); + // var stunServers ="stun:stun.l.google.com:19302,stun:stun.voip.blackberry.com:3478,stun:stun.altar.com.pl:3478,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.sonetel.net:3478,stun:stun.stunprotocol.org:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478"; + + String logFile = null; + if (Prefs.useDebugLogging()) + logFile = "snowflake-log"; + var logToStateDir = true; + var keepLocalAddresses = true; + var unsafeLogging = Prefs.useDebugLogging(); + int maxPeers = 1; + + IPtProxy.startSnowflake(stunServers, target, front, null, logFile, logToStateDir, keepLocalAddresses, unsafeLogging, maxPeers); - IPtProxy.startSnowflake(stunServer, target, front, null, - null, true, false, false, 1); } private void startSnowflakeClientAmpRendezvous() { - var stunServers ="stun:stun.l.google.com:19302,stun:stun.voip.blackberry.com:3478,stun:stun.altar.com.pl:3478,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.sonetel.net:3478,stun:stun.stunprotocol.org:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478"; - var target = "https://snowflake-broker.torproject.net/"; - var front = "www.google.com"; - var ampCache ="https://cdn.ampproject.org/"; - IPtProxy.startSnowflake(stunServers, target, front, ampCache, null, true, false, false, 1); + var stunServers = getCdnFront("snowflake-stun"); + // var stunServers ="stun:stun.l.google.com:19302,stun:stun.voip.blackberry.com:3478,stun:stun.altar.com.pl:3478,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.sonetel.net:3478,stun:stun.stunprotocol.org:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478"; + var target = getCdnFront("snowflake-amp-target");//"https://snowflake-broker.torproject.net/"; + var front = getCdnFront("snowflake-amp-front");//"www.google.com"; + var ampCache =getCdnFront("snowflake-amp-cache");//"https://cdn.ampproject.org/"; + + String logFile = null; + if (Prefs.useDebugLogging()) + logFile = "snowflake-log"; + var logToStateDir = true; + var keepLocalAddresses = true; + var unsafeLogging = Prefs.useDebugLogging(); + var maxPeers = 1; + + IPtProxy.startSnowflake(stunServers, target, front, ampCache, logFile, logToStateDir, keepLocalAddresses, unsafeLogging, maxPeers); + } @SuppressWarnings("ConstantConditions")