Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add feature MR-212 - Add option to connect without credentials

I have my username/password stored in mRemote, but sometimes i want to
log in as the service account or administrator account for various
reasons. This "new feature" allows you to quickly enter credentials
without changing other settings.
(cherry picked from commit 2ec0cdb by cyclops1982)

Conflicts:
	mRemoteV1/Language/Language.Designer.vb
	mRemoteV1/Language/Language.resx
  • Loading branch information...
commit 2db04225a7bea0b5389aef17e66457625a2a2d86 1 parent b600411
@rmcardle authored
View
1  CHANGELOG.TXT
@@ -1,6 +1,7 @@
1.73:
Added feature MR-16 - Add keyboard shortcuts to switch between tabs
Added feature MR-141 - Add a default protocol option
+ Added feature MR-212 - Add option to connect without credentials
Added feature MR-547 - Add support for Xming Portable PuTTY
Made improvement MR-367 - Make the 'Connect' button on the 'Quick Connect' toolbar a forced dropdown
Made improvement MR-590 - Make panels docked to the edge of the window keep their size
View
1  CREDITS.TXT
@@ -4,6 +4,7 @@ Contributors
Jason Barbier
Wiktor Beryt
Lionel Caignec
+Ruben d'Arco
Felix Deimel
Holger Henke
Tom Hiller
View
1  mRemoteV1/Connection/Connection.Info.vb
@@ -2514,6 +2514,7 @@ Namespace Connection
DoNotJump = 4
OverridePanel = 8
DontUseConsoleSession = 16
+ NoCredentials = 32
End Enum
End Class
End Namespace
View
2  mRemoteV1/Connection/Connection.Protocol.HTTPBase.vb
@@ -74,7 +74,7 @@ Namespace Connection
Dim strHost As String = Me.InterfaceControl.Info.Hostname
Dim strAuth As String = ""
- If Me.InterfaceControl.Info.Username <> "" And Me.InterfaceControl.Info.Password <> "" Then
+ If Not ((Force And Info.Force.NoCredentials) = Info.Force.NoCredentials) And Not String.IsNullOrEmpty(InterfaceControl.Info.Username) And Not String.IsNullOrEmpty(InterfaceControl.Info.Password) Then
strAuth = "Authorization: Basic " + Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(Me.InterfaceControl.Info.Username & ":" & Me.InterfaceControl.Info.Password)) & vbNewLine
End If
View
2  mRemoteV1/Connection/Connection.Protocol.ICA.vb
@@ -97,6 +97,8 @@ Namespace Connection
#Region "Private Methods"
Private Sub SetCredentials()
Try
+ If (Force And Info.Force.NoCredentials) = Info.Force.NoCredentials Then Return
+
Dim _user As String = Me.Info.Username
Dim _pass As String = Me.Info.Password
Dim _dom As String = Me.Info.Domain
View
13 mRemoteV1/Connection/Connection.Protocol.PuttyBase.vb
@@ -135,11 +135,14 @@ Namespace Connection
End If
arguments.Add("-" & _PuttySSHVersion)
- If Not String.IsNullOrEmpty(username) Then
- arguments.Add("-l", username)
- End If
- If Not String.IsNullOrEmpty(password) Then
- arguments.Add("-pw", password)
+
+ If Not ((Force And Info.Force.NoCredentials) = Info.Force.NoCredentials) Then
+ If Not String.IsNullOrEmpty(username) Then
+ arguments.Add("-l", username)
+ End If
+ If Not String.IsNullOrEmpty(password) Then
+ arguments.Add("-pw", password)
+ End If
End If
End If
View
4 mRemoteV1/Connection/Connection.Protocol.RDP.vb
@@ -252,7 +252,7 @@ Namespace Connection
If _connectionInfo.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard Then
_rdpClient.TransportSettings.GatewayCredsSource = 1 ' TSC_PROXY_CREDS_MODE_SMARTCARD
End If
- If _rdpVersion >= Versions.RDC61 Then
+ If _rdpVersion >= Versions.RDC61 And Not ((Force And Info.Force.NoCredentials) = Info.Force.NoCredentials) Then
If _connectionInfo.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes Then
_rdpClient.TransportSettings2.GatewayUsername = _connectionInfo.Username
_rdpClient.TransportSettings2.GatewayPassword = _connectionInfo.Password
@@ -298,6 +298,8 @@ Namespace Connection
Private Sub SetCredentials()
Try
+ If (Force And Info.Force.NoCredentials) = Info.Force.NoCredentials Then Return
+
Dim userName As String = _connectionInfo.Username
Dim password As String = _connectionInfo.Password
Dim domain As String = _connectionInfo.Domain
View
2  mRemoteV1/Connection/Connection.Protocol.VNC.vb
@@ -208,7 +208,7 @@ Namespace Connection
AddHandler VNC.ConnectComplete, AddressOf VNCEvent_Connected
AddHandler VNC.ConnectionLost, AddressOf VNCEvent_Disconnected
AddHandler mRemoteNG.frmMain.clipboardchange, AddressOf VNCEvent_ClipboardChanged
- If Not String.IsNullOrEmpty(Info.Password) Then
+ If Not ((Force And Info.Force.NoCredentials) = Info.Force.NoCredentials) And Not String.IsNullOrEmpty(Info.Password) Then
VNC.GetPassword = AddressOf VNCEvent_Authenticate
End If
Catch ex As Exception
View
9 mRemoteV1/Language/Language.Designer.vb
@@ -1290,6 +1290,15 @@ Namespace My
End Property
'''<summary>
+ ''' Looks up a localized string similar to Connect without credentials.
+ '''</summary>
+ Friend Shared ReadOnly Property strConnectNoCredentials() As String
+ Get
+ Return ResourceManager.GetString("strConnectNoCredentials", resourceCulture)
+ End Get
+ End Property
+
+ '''<summary>
''' Looks up a localized string similar to Connect to console session.
'''</summary>
Friend Shared ReadOnly Property strConnectToConsoleSession() As String
View
3  mRemoteV1/Language/Language.resx
@@ -539,6 +539,9 @@ Starting with new connections file.</value>
<data name="strConnectionsFileCouldNotSaveAs" xml:space="preserve">
<value>Couldn't save connections file as "{0}"!</value>
</data>
+ <data name="strConnectNoCredentials" xml:space="preserve">
+ <value>Connect without credentials</value>
+ </data>
<data name="strConnectToConsoleSession" xml:space="preserve">
<value>Connect to console session</value>
</data>
View
7 mRemoteV1/My Project/Resources.Designer.vb
@@ -410,6 +410,13 @@ Namespace My.Resources
End Get
End Property
+ Friend ReadOnly Property key_delete() As System.Drawing.Bitmap
+ Get
+ Dim obj As Object = ResourceManager.GetObject("key_delete", resourceCulture)
+ Return CType(obj,System.Drawing.Bitmap)
+ End Get
+ End Property
+
Friend ReadOnly Property Keyboard() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Keyboard", resourceCulture)
View
4 mRemoteV1/My Project/Resources.resx
@@ -448,4 +448,8 @@
<data name="PuttySessions" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Images\PuttySessions.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="key_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\key_delete.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
</root>
View
BIN  mRemoteV1/Resources/key_delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
22 mRemoteV1/UI/UI.Window.Tree.vb
@@ -24,6 +24,7 @@ Namespace UI
Friend WithEvents cMenTreeConnect As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeConnectWithOptions As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeConnectWithOptionsConnectToConsoleSession As System.Windows.Forms.ToolStripMenuItem
+ Friend WithEvents cMenTreeConnectWithOptionsNoCredentials As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeConnectWithOptionsConnectInFullscreen As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeDisconnect As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents cMenTreeSep2 As System.Windows.Forms.ToolStripSeparator
@@ -66,6 +67,7 @@ Namespace UI
Me.cMenTreeConnectWithOptionsConnectToConsoleSession = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeConnectWithOptionsDontConnectToConsoleSession = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeConnectWithOptionsConnectInFullscreen = New System.Windows.Forms.ToolStripMenuItem()
+ Me.cMenTreeConnectWithOptionsNoCredentials = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeConnectWithOptionsChoosePanelBeforeConnecting = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeDisconnect = New System.Windows.Forms.ToolStripMenuItem()
Me.cMenTreeSep2 = New System.Windows.Forms.ToolStripSeparator()
@@ -132,7 +134,7 @@ Namespace UI
Me.cMenTree.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cMenTreeAddConnection, Me.cMenTreeAddFolder, Me.cMenTreeSep1, Me.cMenTreeConnect, Me.cMenTreeConnectWithOptions, Me.cMenTreeDisconnect, Me.cMenTreeSep2, Me.cMenTreeToolsTransferFile, Me.cMenTreeToolsImportExport, Me.cMenTreeToolsSort, Me.cMenTreeToolsExternalApps, Me.cMenTreeSep3, Me.cMenTreeDuplicate, Me.cMenTreeRename, Me.cMenTreeDelete, Me.cMenTreeSep4, Me.cMenTreeMoveUp, Me.cMenTreeMoveDown})
Me.cMenTree.Name = "cMenTree"
Me.cMenTree.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional
- Me.cMenTree.Size = New System.Drawing.Size(187, 336)
+ Me.cMenTree.Size = New System.Drawing.Size(187, 358)
'
'cMenTreeAddConnection
'
@@ -164,7 +166,7 @@ Namespace UI
'
'cMenTreeConnectWithOptions
'
- Me.cMenTreeConnectWithOptions.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cMenTreeConnectWithOptionsConnectToConsoleSession, Me.cMenTreeConnectWithOptionsDontConnectToConsoleSession, Me.cMenTreeConnectWithOptionsConnectInFullscreen, Me.cMenTreeConnectWithOptionsChoosePanelBeforeConnecting})
+ Me.cMenTreeConnectWithOptions.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cMenTreeConnectWithOptionsConnectToConsoleSession, Me.cMenTreeConnectWithOptionsDontConnectToConsoleSession, Me.cMenTreeConnectWithOptionsConnectInFullscreen, Me.cMenTreeConnectWithOptionsNoCredentials, Me.cMenTreeConnectWithOptionsChoosePanelBeforeConnecting})
Me.cMenTreeConnectWithOptions.Name = "cMenTreeConnectWithOptions"
Me.cMenTreeConnectWithOptions.Size = New System.Drawing.Size(186, 22)
Me.cMenTreeConnectWithOptions.Text = "Connect (with options)"
@@ -189,6 +191,13 @@ Namespace UI
Me.cMenTreeConnectWithOptionsConnectInFullscreen.Size = New System.Drawing.Size(231, 22)
Me.cMenTreeConnectWithOptionsConnectInFullscreen.Text = "Connect in fullscreen"
'
+ 'cMenTreeConnectWithOptionsNoCredentials
+ '
+ Me.cMenTreeConnectWithOptionsNoCredentials.Image = Global.mRemoteNG.My.Resources.Resources.key_delete
+ Me.cMenTreeConnectWithOptionsNoCredentials.Name = "cMenTreeConnectWithOptionsNoCredentials"
+ Me.cMenTreeConnectWithOptionsNoCredentials.Size = New System.Drawing.Size(231, 22)
+ Me.cMenTreeConnectWithOptionsNoCredentials.Text = "Connect without credentials"
+ '
'cMenTreeConnectWithOptionsChoosePanelBeforeConnecting
'
Me.cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Image = Global.mRemoteNG.My.Resources.Resources.Panels
@@ -481,6 +490,7 @@ Namespace UI
cMenTreeConnect.Text = My.Language.strConnect
cMenTreeConnectWithOptions.Text = My.Language.strConnectWithOptions
cMenTreeConnectWithOptionsConnectToConsoleSession.Text = My.Language.strConnectToConsoleSession
+ cMenTreeConnectWithOptionsNoCredentials.Text = My.Language.strConnectNoCredentials
cMenTreeConnectWithOptionsConnectInFullscreen.Text = My.Language.strConnectInFullscreen
cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Text = My.Language.strChoosePanelBeforeConnecting
cMenTreeDisconnect.Text = My.Language.strMenuDisconnect
@@ -697,6 +707,10 @@ Namespace UI
cMenTreeConnectWithOptionsConnectToConsoleSession.Enabled = False
End If
+ If (connectionInfo.Protocol = mRemoteNG.Connection.Protocol.Protocols.IntApp) Then
+ cMenTreeConnectWithOptionsNoCredentials.Enabled = False
+ End If
+
cMenTreeToolsImportExport.Enabled = False
Case mRemoteNG.Tree.Node.Type.PuttySession
Dim puttySessionInfo As mRemoteNG.Connection.PuttySession.Info = selectedNode.Tag
@@ -937,6 +951,10 @@ Namespace UI
App.Runtime.OpenConnection(mRemoteNG.Connection.Info.Force.UseConsoleSession Or mRemoteNG.Connection.Info.Force.DoNotJump)
End Sub
+ Private Sub cMenTreeConnectWithOptionsNoCredentials_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cMenTreeConnectWithOptionsNoCredentials.Click
+ App.Runtime.OpenConnection(mRemoteNG.Connection.Info.Force.NoCredentials)
+ End Sub
+
Private Sub cMenTreeConnectWithOptionsDontConnectToConsoleSession_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cMenTreeConnectWithOptionsDontConnectToConsoleSession.Click
App.Runtime.OpenConnection(mRemoteNG.Connection.Info.Force.DontUseConsoleSession Or mRemoteNG.Connection.Info.Force.DoNotJump)
End Sub
View
1  mRemoteV1/mRemoteV1.vbproj
@@ -777,6 +777,7 @@
<Content Include="Help\Update.htm">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <None Include="Resources\key_delete.png" />
<None Include="Resources\Images\PuttySessions.png" />
<None Include="Notes\Help.txt" />
<None Include="Notes\ICA.txt" />
Please sign in to comment.
Something went wrong with that request. Please try again.