aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-03-16 14:10:45 -0400
committerB. Stack <bgstack15@gmail.com>2022-03-16 14:10:45 -0400
commit5ff15f53eb16c1b6326c6127744908d9b105214c (patch)
tree654eeb5729f1f3be6022c1b3be2ea9480c3c3f16 /README.md
downloadfifconfig-5ff15f53eb16c1b6326c6127744908d9b105214c.tar.gz
fifconfig-5ff15f53eb16c1b6326c6127744908d9b105214c.tar.bz2
fifconfig-5ff15f53eb16c1b6326c6127744908d9b105214c.zip
initial commit
Diffstat (limited to 'README.md')
-rw-r--r--README.md64
1 files changed, 64 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..32495eb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,64 @@
+# README for fifconfig
+## Metadata
+Filename: README.md
+Location: https://gitlab.com/bgstack15/fifconfig
+Author: bgstack15
+Startdate: 2022-03-15
+Title: Flask-ifconfig, or Http client diagnostic webapp
+Purpose: Replicate http://ifconfig.me
+History:
+Usage:
+Reference: See References heading
+Improve:
+Dependencies: See Dependencies heading
+Documentation:
+
+## Upstream
+[gitlab](https://gitlab.com/bgstack15/fifconfig)
+[author's git](https://bgstack15.ddns.net/cgit/fifconfig)
+
+## Features
+
+* Provide different output type based on `Accept` header or url parameter. Options include:
+ * `application/json` or `?json`
+ * `text/html` or `?html`
+ * `application/xml` or `?xml`
+ * `text/plain` or `?text`
+* Display IP address as viewed by the web server, or else the first entry of `HTTP_X_FORWARDED_FOR`.
+
+## Using fifconfig
+Visit the application.
+
+ curl -L https://bgstack15.ddns.net/ifconfig/?json | jq
+
+### Installing
+
+You can use flask for development, and uwsgi for production.
+
+### Instructions
+
+Configure the application with these two files, based on the `.example` files available in the source code:
+
+* fifconfig.conf
+* fifconfig.wsgi.ini
+
+#### Development
+Run server in development mode.
+
+ FLASK_APP=fifconfig.py FLASK_DEBUG=True flask run --host='0.0.0.0'
+
+#### Production
+Run the server in a full wsgi environment for the cleanup timer to operate.
+
+ ./fifconfig.bin
+
+The html responses include links to the various single-field pages, unless you add a parameter `?nolinks`. These links depend on any reverse-proxy servers adding themselves correctly to header `X-Forwarded-For`.
+
+## Alternatives
+This project was a ripoff of love of [http://ifconfig.me](http://ifconfig.me).
+
+## References
+
+1. [flask.Request &mdash; Flask API](https://tedboy.github.io/flask/generated/generated/flask.Request.html)
+2. [my stackbin.py project](https://bgstack15.ddns.net/cgit/stackbin/tree/stackbin.py)
+3. [dicttoxml - PyPI](https://pypi.org/project/dicttoxml)
bgstack15