Added support for authentication codes for the VM service. (#30857)
* Added support for authentication codes for the VM service.
Previously, a valid web socket connection would use the following URI:
`ws://127.0.0.1/ws`
Now, by default, the VM service requires a connection to be made with a
URI similar to the following:
`ws://127.0.0.1:8181/Ug_U0QVsqFs=/ws`
where `Ug_U0QVsqFs` is an authentication code generated and shared by
the
service.
This behavior can be disabled with the `--disable-service-auth-codes`
flag.
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart
index 1ff9e38..29bb3e7 100644
--- a/packages/flutter_tools/lib/src/device.dart
+++ b/packages/flutter_tools/lib/src/device.dart
@@ -367,6 +367,7 @@
DebuggingOptions.enabled(
this.buildInfo, {
this.startPaused = false,
+ this.disableServiceAuthCodes = false,
this.enableSoftwareRendering = false,
this.skiaDeterministicRendering = false,
this.traceSkia = false,
@@ -381,6 +382,7 @@
: debuggingEnabled = false,
useTestFonts = false,
startPaused = false,
+ disableServiceAuthCodes = false,
enableSoftwareRendering = false,
skiaDeterministicRendering = false,
traceSkia = false,
@@ -393,6 +395,7 @@
final BuildInfo buildInfo;
final bool startPaused;
+ final bool disableServiceAuthCodes;
final bool enableSoftwareRendering;
final bool skiaDeterministicRendering;
final bool traceSkia;