Skip to content

Commit

Permalink
Merge pull request #55 from OSC/095
Browse files Browse the repository at this point in the history
v0.95
  • Loading branch information
brianmcmichael authored May 9, 2017
2 parents c549b46 + 31be460 commit 2153a76
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 30 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

All notable changes to this project will be documented in this file. This project adheres to [Assembly Versioning](https://msdn.microsoft.com/en-us/library/51ket42z(v=vs.71).aspx).

## Upcoming
## v0.95

* Add Owens cluster as default.
* Saved password updates on change.
* Fix version checking bug.
* Fix hang when cluster non-responsive.
* Update to PuTTY/Plink 0.69
* Update to TurboVNC 2.1.1
* Update to WinSCP 5.9.5

## v0.94

Expand Down
39 changes: 39 additions & 0 deletions OSCConnect/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,52 @@
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="OSCConnect.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="AweSimConnect.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>

<supportedRuntime version="v2.0.50727"/></startup>
<userSettings>
<OSCConnect.Properties.Settings>
<setting name="Username" serializeAs="String">
<value />
</setting>
<setting name="Userpass" serializeAs="String">
<value />
</setting>
<setting name="IsPassSaved" serializeAs="String">
<value>False</value>
</setting>
<setting name="SSHHost" serializeAs="String">
<value>OWN</value>
</setting>
<setting name="AutoOpenApp" serializeAs="String">
<value>True</value>
</setting>
<setting name="DetectClipboard" serializeAs="String">
<value>False</value>
</setting>
<setting name="CommandLineUpdated" serializeAs="String">
<value>False</value>
</setting>
<setting name="LaunchSSHOnImport" serializeAs="String">
<value>True</value>
</setting>
<setting name="NewerVersionAvailable" serializeAs="String">
<value>False</value>
</setting>
<setting name="AutoCheckNewVersion" serializeAs="String">
<value>True</value>
</setting>
<setting name="WriteableUser" serializeAs="String">
<value>False</value>
</setting>
<setting name="VNCQuality" serializeAs="String">
<value>95</value>
</setting>
</OSCConnect.Properties.Settings>
<AweSimConnect.Properties.Settings>
<setting name="Username" serializeAs="String">
<value />
Expand Down
22 changes: 18 additions & 4 deletions OSCConnect/Controllers/NetworkTools.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Net.Sockets;
using System.Windows.Forms;
using System.Timers;

namespace OSCConnect.Controllers
{
Expand All @@ -11,11 +12,11 @@ class NetworkTools
{
private static int TELNET_PORT = 22;

//Checks for connectivity to Default server (currently Oakley). Use for diagnostic.
//Checks for connectivity to Default server (currently Owens). Use for diagnostic.
public static bool CanTelnetToDefault()
{
string oakley = new OSCClusterController().ClusterDomain();
return CanTelnetToHost(oakley);
string defaultHost = new OSCClusterController().ClusterDomain();
return CanTelnetToHost(defaultHost);
}

// Checks the localhost for an open port.
Expand All @@ -35,7 +36,20 @@ public static bool IsPortOpen(String host, int port)
using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
try
{
socket.Connect(host, port);
//socket.Connect(host, port);

// Connect using a timeout (2 seconds)
IAsyncResult result = socket.BeginConnect(host, port, null, null);

bool success = result.AsyncWaitHandle.WaitOne(2000, true);

if (!socket.Connected)
{
// NOTE, MUST CLOSE THE SOCKET
socket.Close();
throw new SocketException();
}

return true;
}
catch (SocketException ex)
Expand Down
14 changes: 4 additions & 10 deletions OSCConnect/Controllers/OSCClusterController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ public enum Cluster
{
OWENS,
OAKLEY,
RUBY,
GLENN
RUBY
}

// SSH Nodes
static OSCCluster owens = new OSCCluster("OWN", "Owens", "owens.osc.edu");
static OSCCluster oakley = new OSCCluster("OAK", "Oakley", "oakley.osc.edu");
static OSCCluster ruby = new OSCCluster("RBY", "Ruby", "ruby.osc.edu");
static OSCCluster glenn = new OSCCluster("OPT", "Glenn", "glenn.osc.edu");

// Other Hosts
public static OSCCluster SFTP_CLUSTER = new OSCCluster("FTP", "SFTP", "sftp.osc.edu");
Expand All @@ -33,7 +31,7 @@ public enum Cluster

public OSCClusterController()
{
init(oakley);
init(owens);
}

public OSCClusterController(OSCCluster selected)
Expand All @@ -47,7 +45,6 @@ private void init(OSCCluster selected)
list.Add(owens); // Index 0
list.Add(oakley); // Index 1
list.Add(ruby); // Index 2
list.Add(glenn); // Index 3

this.clusterList = list;
this.selectedCluster = selected;
Expand All @@ -59,9 +56,9 @@ public void SetCluster(string code)
{
this.selectedCluster = ruby;
}
else if (code.Equals(glenn.Code))
else if (code.Equals(owens.Code))
{
this.selectedCluster = glenn;
this.selectedCluster = owens;
}
else
{
Expand All @@ -83,9 +80,6 @@ public void SetCluster(Cluster cluster)
case Cluster.RUBY:
this.selectedCluster = ruby;
break;
case Cluster.GLENN:
this.selectedCluster = glenn;
break;
default:
this.selectedCluster = owens;
break;
Expand Down
8 changes: 4 additions & 4 deletions OSCConnect/LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ Tamir.SharpSSH 1.1.1.13
http://www.tamirgal.com/blog/page/SharpSSH.aspx
BSD-3-Clause

Plink 0.67
Plink 0.69
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
MIT License

PuTTY 0.67
PuTTY 0.69
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
MIT License

Expand All @@ -24,10 +24,10 @@ Metrize Icons
http://www.alessioatzeni.com/metrize-icons/
Free Commercial License

TurboVNC 2.0.91
TurboVNC 2.1.1
http://sourceforge.net/projects/turbovnc/
GPLv2

WinSCP 5.7.7
WinSCP 5.9.5
http://winscp.net/eng/docs/license
GPL
6 changes: 3 additions & 3 deletions OSCConnect/OSCConnect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net20\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net20\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Org.Mentalis.Security, Version=1.0.13.715, Culture=neutral">
Expand Down Expand Up @@ -214,8 +214,8 @@
<Content Include="libs\Tamir.SharpSSH.dll" />
<None Include="Resources\WinSCP.exe" />
<None Include="Resources\vncviewer.exe" />
<None Include="Resources\plink.exe" />
<None Include="Resources\putty.exe" />
<None Include="Resources\plink.exe" />
<None Include="Resources\osclogo2.jpg" />
<None Include="Resources\osctransparent.png" />
<None Include="Resources\oscicontransparent.ico" />
Expand Down
6 changes: 3 additions & 3 deletions OSCConnect/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OSC Connect")]
[assembly: AssemblyCopyright("Copyright © 2015-2016")]
[assembly: AssemblyCopyright("Copyright © 2015-2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,6 +32,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.94.*")]
[assembly: AssemblyFileVersion("0.94")]
[assembly: AssemblyVersion("0.95.*")]
[assembly: AssemblyFileVersion("0.95")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
2 changes: 1 addition & 1 deletion OSCConnect/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions OSCConnect/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="AweSimConnect.Properties" GeneratedClassName="Settings">
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="OSCConnect.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="Username" Type="System.String" Scope="User">
Expand All @@ -12,7 +12,7 @@
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="SSHHost" Type="System.String" Scope="User">
<Value Profile="(Default)">OAK</Value>
<Value Profile="(Default)">OWN</Value>
</Setting>
<Setting Name="AutoOpenApp" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
Expand Down
Binary file modified OSCConnect/Resources/WinSCP.exe
Binary file not shown.
Binary file modified OSCConnect/Resources/plink.exe
Binary file not shown.
Binary file modified OSCConnect/Resources/putty.exe
Binary file not shown.
Binary file modified OSCConnect/Resources/vncviewer.exe
Binary file not shown.
5 changes: 4 additions & 1 deletion OSCConnect/Views/ConnectMainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,10 +752,13 @@ private void timerMain_Tick(object sender, EventArgs e)
if (_secondsElapsed % 15 == 0)
{
bool availableBeforeCheck = _networkAvailable;
_networkAvailable = NetworkTools.CanTelnetToHost(_clusterc.GetCluster(_settings.GetSSHHostCode()).Domain);
_networkChanged = (availableBeforeCheck != _networkAvailable);
EnableTunnelOptions(_networkAvailable && _sshAvailable);
}

if (_secondsElapsed % 30 == 0)
{
_networkAvailable = NetworkTools.CanTelnetToHost(_clusterc.GetCluster(_settings.GetSSHHostCode()).Domain);
}

if (_secondsElapsed % 2 == 0)
Expand Down
2 changes: 1 addition & 1 deletion OSCConnect/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<packages>
<package id="Costura.Fody" version="1.3.3.0" targetFramework="net2" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net2" developmentDependency="true" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net20" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net20" />
<package id="Tamir.SharpSSH" version="1.1.1.13" targetFramework="net2" />
</packages>

0 comments on commit 2153a76

Please sign in to comment.