Compare commits
No commits in common. "56f909d2296d3130a8ba830e7d7353a8fa104ccc" and "0211a6e4af0ad7fc582ad1533dacd4078b5014bd" have entirely different histories.
56f909d229
...
0211a6e4af
7 changed files with 2 additions and 77 deletions
16
.drone.yml
16
.drone.yml
|
@ -1,16 +0,0 @@
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: Tests
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: test
|
|
||||||
image: golang
|
|
||||||
commands:
|
|
||||||
- cd tracker
|
|
||||||
- make build
|
|
||||||
- make test
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- tag
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -15,9 +15,6 @@
|
||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
# build directory
|
|
||||||
tracker/build
|
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
# Dependency directories (remove the comment below to include it)
|
||||||
# vendor/
|
# vendor/
|
||||||
|
|
||||||
|
|
30
README.md
30
README.md
|
@ -1,29 +1,3 @@
|
||||||
# Public IP tracker
|
# public-ip-tracker
|
||||||
|
|
||||||
[![Build Status](https://drone.faercol.me/api/badges/faercol/public-ip-tracker/status.svg)](https://drone.faercol.me/faercol/public-ip-tracker)
|
Simple Go project to track current public IP and notify changes to a telegram bot
|
||||||
|
|
||||||
|
|
||||||
Telegram bot that detects changes to the device's public IP. This is particularily useful when
|
|
||||||
the device is handled by an ISP that does not provide a static public IP, such as a home device.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
### Automatic public IP detection and monitoring
|
|
||||||
|
|
||||||
Upon startup, the current public IP is detected, and a status message is sent to a specific Telegram
|
|
||||||
channel with the relevant information.
|
|
||||||
|
|
||||||
> Insert example message here
|
|
||||||
|
|
||||||
When running as a daemon, the program automatically monitors the current public IP adress for changes.
|
|
||||||
If the IP changes for some reason, then the new updated adress is sent to the specific Telegram
|
|
||||||
channel.
|
|
||||||
|
|
||||||
> Insert example message here
|
|
||||||
|
|
||||||
### On-demand public IP
|
|
||||||
|
|
||||||
The relevant channel is monitored during the program execution. This allows the user to send a
|
|
||||||
command to the bot in order to get the current public IP on-demand.
|
|
||||||
|
|
||||||
> Insert example here
|
|
|
@ -1,7 +0,0 @@
|
||||||
.PHONY: build test
|
|
||||||
|
|
||||||
build:
|
|
||||||
go build -o build/
|
|
||||||
|
|
||||||
test:
|
|
||||||
go test -v ./...
|
|
|
@ -1,3 +0,0 @@
|
||||||
module git.faercol.me/faercol/public-ip-tracker/tracker
|
|
||||||
|
|
||||||
go 1.16
|
|
|
@ -1,11 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import "fmt"
|
|
||||||
|
|
||||||
func testMethod(a int) int {
|
|
||||||
return a + 2
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
fmt.Println("public ip tracker")
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import "testing"
|
|
||||||
|
|
||||||
func TestTestMethod(t *testing.T) {
|
|
||||||
if testMethod(12) != 14 {
|
|
||||||
t.Fatalf("Unexpected result %d", testMethod((12)))
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue