Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable net traffic #14083

Merged
merged 6 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/DynamoApplications/StartupUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,10 @@ private static DynamoModel StartDynamoWithDefaultConfig(bool CLImode,
HostAnalyticsInfo = info,
CLIMode = CLImode
};
config.AuthProvider = CLImode ? null : new Core.IDSDKManager();

// ALIAS does needs a total network traffic blackout.
config.AuthProvider = null;
QilongTang marked this conversation as resolved.
Show resolved Hide resolved

config.UpdateManager = CLImode ? null : InitializeUpdateManager();
config.StartInTestMode = CLImode;
config.PathResolver = CLImode ? new CLIPathResolver(preloaderLocation, userDataFolder, commonDataFolder) as IPathResolver : new SandboxPathResolver(preloaderLocation) as IPathResolver;
Expand Down
5 changes: 4 additions & 1 deletion src/DynamoPackagesWPF/PackageManagerViewExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ private void RequestLoadViewExtensionsForLoadedPackages(IEnumerable<Package> pac

private void RaisePackageHostNotifications(IEnumerable<Package> packages)
{
// ALIAS does needs a total network traffic blackout.
// Since there is no way to switch this on/off, we will just skip it for now.
/*
foreach (var pkg in packages)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code would not raise network traffic right? This is the code to check if the installed package is targetting other host. I think @zeusongit recently worked on it..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented it out because it did try to contact pacakage manager.
I could not find a way to disable through API or configs. @zeusongit any idea if there is a way to disable this ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reading the code, I can see why now. In function CheckIfPackagesTargetOtherHosts there is a call var knownHosts = PackageManagerClient.GetKnownHosts(); which will contact package manager

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this solution is fine for now but we probably want to guard all of these code using the env variable or setting property on master branch.

{
//check that the package does not target another host, if it does raise a warning.
Expand All @@ -154,7 +157,7 @@ private void RaisePackageHostNotifications(IEnumerable<Package> packages)
Resources.TitlePackageTargetOtherHost));
}
}

*/
}

private void RequestLoadLayoutSpecs(IEnumerable<Package> packages)
Expand Down