Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wickdchromosome/gimmeip
A multithreaded web service from scratch for getting your public IP easily in shell scripts or from the browser
https://github.com/wickdchromosome/gimmeip
Last synced: 26 days ago
JSON representation
A multithreaded web service from scratch for getting your public IP easily in shell scripts or from the browser
- Host: GitHub
- URL: https://github.com/wickdchromosome/gimmeip
- Owner: wickdChromosome
- Created: 2020-09-22T01:24:34.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-15T17:52:24.000Z (over 3 years ago)
- Last Synced: 2024-03-12T15:29:09.084Z (8 months ago)
- Language: C
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gimmeip.org
## Description
This web server is not currently hosted under gimmeip.org, but you can still pull the repo, compile and run the service if needed.
Intended to be an easy way to get your public IP address from a terminal, for use in scripts(check to make sure VPN works, etc) for example. To get your public IP, you can do:
```
my_ip=$(curl $WEBSERVER_IP) && echo $my_ip
127.0.0.1
```The webapp also serves a webpage if you directly visit the url.
## Compilation
To compile the project, simply do:
```
make
```
in the project directory.For the debug build, you can do:
```
make debug
```## Configuration
You can configure the port and host address using the macros in the gimmeip_server.c file.
The input_html.html file contains the html for the page to be served. The embed_html.sh script converts this to a stack allocated string during compilation, and this acts as a template for all the other webpages to be served.