Skip to content

Commit

Permalink
always log snowflake, but delete each time; also disable unsafe loggi…
Browse files Browse the repository at this point in the history
…ng by default
  • Loading branch information
n8fr8 committed Oct 20, 2022
1 parent 56138d8 commit 2f341f0
Showing 1 changed file with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,25 +339,16 @@ private void startSnowflakeClientDomainFronting() {
var stunServers = getCdnFront("snowflake-stun");

String logFile = null;
if (Prefs.useDebugLogging()) {
File fileLog = new File(appCacheHome, LOG_SNOWFLAKE);
if (fileLog.exists())
fileLog.delete();
logFile = fileLog.getAbsolutePath();
}
File fileLog = new File(appCacheHome, LOG_SNOWFLAKE);
if (fileLog.exists())
fileLog.delete();
logFile = fileLog.getAbsolutePath();

var logToStateDir = false;
var keepLocalAddresses = true;
var unsafeLogging = Prefs.useDebugLogging();
int maxPeers = 1;

/**
* You can experiment with different settings of utls-imitate in the bridge line:
*
* hellochrome_auto
* helloios_auto
* hellorandomizedalpn
*/
IPtProxy.startSnowflake(stunServers, target, front, null, logFile, logToStateDir, keepLocalAddresses, unsafeLogging, maxPeers);

}
Expand All @@ -369,13 +360,10 @@ private void startSnowflakeClientAmpRendezvous() {
var ampCache =getCdnFront("snowflake-amp-cache");//"https://cdn.ampproject.org/";

String logFile = null;
if (Prefs.useDebugLogging()) {
File fileLog = new File(appCacheHome, LOG_SNOWFLAKE);
if (fileLog.exists())
fileLog.delete();
logFile = fileLog.getAbsolutePath();
}

File fileLog = new File(appCacheHome, LOG_SNOWFLAKE);
if (fileLog.exists())
fileLog.delete();
logFile = fileLog.getAbsolutePath();

var logToStateDir = false;
var keepLocalAddresses = true;
Expand Down Expand Up @@ -1336,6 +1324,13 @@ private void getBridges(String type, StringBuffer extraLines) {
extraLines.append(' ');
extraLines.append(b.config);
extraLines.append('\n');
/**
* You can experiment with different settings of utls-imitate in the bridge line:
*
* hellochrome_auto
* helloios_auto
* hellorandomizedalpn
*/

bridgeCount++;

Expand Down

0 comments on commit 2f341f0

Please sign in to comment.