-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c87c076
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Follow these steps: | ||
|
||
1. Go to Device Settings from Adguard dashboard. | ||
2. Scroll down and copy the link mentioned below "You can also programmatically update your linked IP address by calling:" | ||
It should lool like this : | ||
|
||
https://linkip.adguard-dns.com/linkip/\<deviceid>/\<somerandom_alphanumeric_characterstring> | ||
3. In autolink.bat, replace the aguard_IP_connect_link string with the above link | ||
4. You can replace the browser name on the same line. Just go to the original install folder of the browser and look up what the .exe is called. | ||
5. Search Task Scheduler in windows and open it. | ||
6. Click on Task Scheduler Library and From Actions, choose Create Task | ||
7. Give any relevant name for the task. | ||
8. Select Run only when user is logged on. | ||
9. Go to Triggers -> New, From "Begin the Task" drop down, select "At log on" and press OK | ||
10. Go to Actions -> New, From Action select Start a program and browse autolink.bat file from browser button. Click OK | ||
11. Click OK on the Create Task window. | ||
12. Check if you see the new task in Task Scheduler Library. If you can, then its done. The sript will run after every login. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@echo off | ||
|
||
title Adguard IP link check | ||
echo %CD% | ||
powershell -Command "(Invoke-WebRequest -uri 'https://api.ipify.org').Content.Trim()" > ip.txt | ||
set /p ip=<ip.txt | ||
echo current : %ip% | ||
set /p prev_ip=<prev_ip.txt | ||
echo previous ip : %prev_ip% | ||
if "%ip%" == "" ( | ||
echo cannot get current IP. Check connection. | ||
) else ( | ||
if "%prev_ip%"=="%ip%" ( | ||
REM checking current and previous IP | ||
echo IP address has not changed since last startup. | ||
) else ( | ||
REM link new IP to adguard | ||
start firefox.exe aguard_IP_connect_link | ||
REM Saving new IP address to file | ||
echo %ip%>prev_ip.txt | ||
) | ||
) | ||
|
||
|
||
timeout /t 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
103.151.136.41 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
103.151.136.41 |