Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Step By Step Tut how to make VPN GUI [VB 6 + OPENVPN Commands]

Sir sample naman po kung paano yung pag run sa notepad kung saan andoon na yung config na gusto mo.

Bali eto po yung Directory path kung saan nasa isang folder nalang lahat.

C:\TestVPN\ etc ....

eto po laman sa TestVPN folder ko.



Please help naman sir kung paanong shell function ang gagamitin ko.

eto rin po yung config sa test.ovpn




tia ...
 
bump! hehe here's my finish vpn with ts source code and some of mine hehe. i forgot to post again on this thread to share :slap:

riczvpn : http://www.mediafire.com/?39q7j92m3sg616v

Adjust especially the header font with your own also this was created last year and have minor bug on it especially locating the drivers when installing but don't have time to fix it. Just fix it on your own hehe :dance:

have a nice day ! :lol:
 
Bat ganun? YUng log ko papuntang left side, d pababa?
 
panu po yung pag lagay ng down and up speed? I mean status..
 
http://www.youtube.com/watch?v=WcrQJ4UMYqM <---eto na yung video tutorial ^_^ pag pasensyahan nyo na hindi ako sanay gumawa eh:yipee:


Part 1
First nating gagawin sympre iopen ang VB6 hehehe wala kang VB6? eto o portable... VB6 portable
then pag open na... maglagay tayo ng dalawang textbox at isang command button
para saan ang dalawang textbox at command button?
eto dapat ang nakalagay sa mga properties nila

textbox1 (Name) = username <---- para sa username natin
textbox2 (Name) = password<---- para sa password natin
command button (Name) = save (caption) = save <--- para sa save button natin

kapag nalagay na natin lahat yan sa kanya kanya nilang properties double click natin yung save button
para malagyan na natin ng code....

Private Sub save_Click()
Open App.Path & ("\data" + "/" + Account + "Account.txt") For Output As #1
Print #1, username.text
Print #1, password.text
Close #1
MsgBox "Saved", vbQuestion, "S-vpn"

End Sub

View attachment 367936


ayan tapos na yata tayo sa account ^_^ pasensya na kung medyo magulo or hindi nyo maintindihan...

Part 2 para sa logs at connect naman tayo :)

gawa ulit tayo ng isang Timer, isang textbox at isang command button ulit ^_^ yung timer ilagay nyo na lang sa isang gilid kasi hindi naman makikita yan...
para saan ito?

Timer (Name) = log_Timer (Enabled) = False (Interval) = 250 <---- yan ang magbabasa ng status ng openvpn natin at mag rerefresh sa textbox3 natin
textbox3 (Name) = logs <---- para sa logs yan
command button (Name) = connect (capton) = Connect <---- para naman sa connect buttong natin

kapag nalagay na ulit natin lahat yan sa kanya kanya nilang properties double click naman po natin yung connect button
para malagyan ulit natin ng code

Private Sub connect_Click()
Shell App.Path & "\bin\openvpn --tls-client --client --dev tun --remote x.x.x.x --proto udp --port 9200 --lport 53 --persist-key --persist-tun --ca data\ca.crt --comp-lzo --mute 3 --tun-mtu 1500 --auth-user-pass data\account.txt --reneg-sec 0 --keepalive 10 120 --route-method exe --route-delay 2 --verb 3 --log data\log.txt --status data\stat.db 1", vbHide
End Sub

pagkatapos na kayo sa connect button eto naman po para sa timer natin

Private Sub log_Timer_Timer()
Dim line(10000) As String
Dim log_ctr As Integer
Open App.Path & "\data\log.txt" For Input Lock Read As #1
Do Until EOF(1)
Line Input #1, line(log_ctr)
log_ctr = log_ctr + 1
Loop
Close #1
If last_log <> log_ctr Then
For n = last_log To log_ctr - 1
Text1.SelStart = Len(Text1.Text)
Text1.SelText = line(n) & vbCrLf
End if
Next
last_log = log_ctr
End If

End Sub

View attachment 367937



yan tapos na tayo ^_^ may account login na at may logs and connect button na..

paano po yung sa Globe or Smart?

Part 3 para sa globe or smart option ^_^

gawa tayo ng 2 option button
para saan na naman toh?

option1 = (Name) = Smart (Caption) = Smart
option2 = (Name) = Globe (Caption) = Globe

kapag nalagay na ulit natin lahat yan sa kanya kanya nilang properties double click naman po natin yung option1 button (smart)
para malagyan ulit natin ng code


Private Sub Smart_Click()
netw = smart.Caption
smart.Caption = "Smart"

End Sub

Private Sub Globe_Click()
netw = smart.Caption
smart.Caption = "Globe"

End Sub

then pakilagay ito sa pinakaitaas ng form code nyo

Dim netw As String

pag nailagay nyo na yan balik na tayo sa connect button double click nyo ulit para mapunta sa code nya.

tapos ayusin natin yung code nya kasi nagdagdag tayo ng option

Private Sub connect_Click()
If netw = "Smart" then
Shell App.Path & "\bin\openvpn --tls-client --client --dev tun --remote x.x.x.x --proto udp --port 9200 --persist-key --persist-tun --ca data\ca.crt --comp-lzo --mute 3 --tun-mtu 1500 --auth-user-pass data\account.txt --reneg-sec 0 --keepalive 10 120 --route-method exe --route-delay 2 --verb 3 --log data\log.txt --status data\stat.db 1", vbHide
End If

If netw = "Globe" then
Shell App.Path & "\bin\openvpn --tls-client --client --dev tun --remote x.x.x.x --proto udp --port 9200 --lport 53 --persist-key --persist-tun --ca data\ca.crt --comp-lzo --mute 3 --tun-mtu 1500 --auth-user-pass data\account.txt --reneg-sec 0 --keepalive 10 120 --route-method exe --route-delay 2 --verb 3 --log data\log.txt --status data\stat.db 1", vbHide
End If

End Sub

View attachment 367950


o ayan tapos na tayo sa part 3 natin ^_^

ano pa ba?

paano kung dalawa or madami ang server nyo?

madali na lang din yan ^_^ eto sa part 4

Part 4 Server selection

gawa po tayo ng isang combo box
paano po ang gagawin sa combo box?

combo box (Name) = server (Enabled) = False
then paki delete yung nasa text nya.

then
sa form load natin ilagay natin ito

Server.AddItem ("Server-1")
Server.AddItem ("Server-2")

bali magiging ganito ang form load nyo

Private Sub Form_Load()
Server.AddItem ("Server-1")
Server.AddItem ("Server-2")

End Sub

then balik tayo sa Smart option and globe option then
burahin nyo na yung netw = smart.caption na nilagay natin then dagdagan natin ng server.Enabled = true

Private Sub Smart_Click()
smart.Caption = "Smart"
server.Enabled = True
End Sub

Private Sub Globe_Click()
smart.Caption = "Globe"
server.Enabled = True
End Sub

tapos double click nyo yung combo box na ginawa natin and dito natin ilagay yung netw =smart.Caption + server.Text

Private Sub Server_Click()
netw = smart.Caption + server.Text
End Sub

then dun na ulit tayo sa connect mag babago...

Private Sub connect_Click()
If netw = "SmartServer-1" then
Shell App.Path & "\bin\openvpn --tls-client --client --dev tun --remote x.x.x.x --proto udp --port 9200 --persist-key --persist-tun --ca data\ca.crt --comp-lzo --mute 3 --tun-mtu 1500 --auth-user-pass data\account.txt --reneg-sec 0 --keepalive 10 120 --route-method exe --route-delay 2 --verb 3 --log data\log.txt --status data\stat.db 1", vbHide
End If

If netw = "GlobeServer-1" then
Shell App.Path & "\bin\openvpn --tls-client --client --dev tun --remote x.x.x.x --proto udp --port 9200 --lport 53 --persist-key --persist-tun --ca data\ca.crt --comp-lzo --mute 3 --tun-mtu 1500 --auth-user-pass data\account.txt --reneg-sec 0 --keepalive 10 120 --route-method exe --route-delay 2 --verb 3 --log data\log.txt --status data\stat.db 1", vbHide
End If

If netw = "SmartServer-2" then
Shell App.Path & "\bin\openvpn --tls-client --client --dev tun --remote x.x.x.x --proto udp --port 9200 --persist-key --persist-tun --ca data\ca.crt --comp-lzo --mute 3 --tun-mtu 1500 --auth-user-pass data\account.txt --reneg-sec 0 --keepalive 10 120 --route-method exe --route-delay 2 --verb 3 --log data\log.txt --status data\stat.db 1", vbHide
End If

If netw = "GlobeServer-2" then
Shell App.Path & "\bin\openvpn --tls-client --client --dev tun --remote x.x.x.x --proto udp --port 9200 --lport 53 --persist-key --persist-tun --ca data\ca.crt --comp-lzo --mute 3 --tun-mtu 1500 --auth-user-pass data\account.txt --reneg-sec 0 --keepalive 10 120 --route-method exe --route-delay 2 --verb 3 --log data\log.txt --status data\stat.db 1", vbHide
End If

End Sub

View attachment 367951

O tapos na ba tayo? may nakalimutan pa ba ako?

ahh Screen shot... wait eto na isusunod ko na..

Thanks to:
Kaz
gnod1
mp3sniff
ggmreg


maraming salamat sa inyo... kung hindi dahil sa mga tulong nyo hindi ako makakagawa nito... 1 week pa lang akong gumagamit ng VB nyan ^_^

yung ibang nag post sa thread iback read ko pa para malagay ko sa thanks :)

eto pala yung mga file ko dito nyo ilalagay yung gawa nyo na exe

View attachment 367929






eto na yata inaantay nyo yung finish product na :yipee:View attachment 367969

Maraming salamat ts :thanks:
 
Back
Top Bottom