Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an openvpn client and store the files locally, how can I open the files from a https?
locally code :
VB
If ComboBox1.Text = "" Then
MsgBox("Select server file from combobox", MsgBoxStyle.OkOnly, "error")
        Else
            openvpnProcess.StartInfo.CreateNoWindow = True
            If CheckBox1.Checked = True Then
                openvpnProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
            Else
                openvpnProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
            End If
           

openvpnProcess.EnableRaisingEvents = True
openvpnProcess.StartInfo.Arguments = "--config " & Me.ComboBox1.SelectedItem & ""
            
openvpnProcess.StartInfo.FileName = "C:\Program Files\OpenVPN\bin\openvpn.exe"
openvpnProcess.StartInfo.WorkingDirectory = "C:\Program Files\OpenVPN\config\"
            openvpnProcess.Start()

it works, but how to open the config file directly from https URL? it is not password protected.
Here is the code not working :
VB
Dim uriAddress1 As New Uri("https://www.xxxx.com/ovpn/xxxx/xxxxxxxcom_TCP.ovpn")
TextBox2.Text = uriAddress1.LocalPath
Posted
Comments
phil.o 26-Oct-15 14:26pm    
If you want to use https protocol you will have to install a web server. Isn't it too much for a local file?
Sergey Alexandrovich Kryukov 26-Oct-15 15:07pm    
Absolutely. One would protect the traffic with TLS encryption while the resource sits in the file which can be directly read. Would be amazingly insane.
—SA
Member 3892343 26-Oct-15 14:52pm    
Thank you
Sergey Alexandrovich Kryukov 26-Oct-15 15:05pm    
To open something as HTTPS, you have to serve this resource as HTTPS, that is, have an HTTP server with TLS, provide certificate, and so on. Then your local application can download the file exactly as it was using some HTTP server on the global Internet network.

But don't you feel how much of a madhouse it would look like? There is no outside traffic you would need to protect by your TLS encryption...

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900