·
Create NGrok NGrok account
·
go to github and create its
account
·
create new repository
o
enter repository name
o
select its visibility ( private for
personal use)
·
click on create repository
·
click on settings
·
click on secrits and visibility
·
click on action
·
click on new repository
·
write the same name “YOUR_SECRET_NAME”
o
now go to ngrok account
o
click on “Your Authtoken”
o
copy this token code
·
paste authtoken code in secret
section box
·
click on add secret
·
Now go to “action”
·
Click on “ set workflow yourself”
·
Paste “code 1” in this section.
·
Click on commit changes
·
Click on commint changes ( Now your
file is ready)
·
click on action
·
click on main.yml file
·
click on build
·
now go to ngrok account
·
click on endpoints
·
here you get “tcp://0.tcp.us-cal-1.ngrok.io:18984” this type of url
· copy all text after “//” like _-----> 0.tcp.us-cal-1.ngrok.io:18984
·
this is your ip iddress
·
see user name and password below
· the code used in gethub also provided you below
Code 1:
----------------------------------------------------------------------
name: CI
on: [push, workflow_dispatch]
jobs:
build:
runs-on: windows-latest
steps:
- name: Download
run: Invoke-WebRequest https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip -OutFile ngrok.zip
- name: Extract
run: Expand-Archive ngrok.zip
- name: Auth
run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN
env:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
- name: Enable TS
run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
- run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
- run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
- run: Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "P@ssw0rd!" -Force)
- name: Create Tunnel
run: .\ngrok\ngrok.exe tcp 3389
-----------------------------------------------------------------------------------------
User Name and Password:
UserName: runneradmin Password: P@ssw0rd!