From d9037a590f870e5235a249e89aa4419aee505edb Mon Sep 17 00:00:00 2001 From: Yash Karandikar Date: Fri, 24 Jun 2022 19:54:14 +0530 Subject: [PATCH] Add readme and (un)license --- README.md | 30 ++++++++++++++++++++++++++++++ UNLICENSE | 24 ++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 README.md create mode 100644 UNLICENSE diff --git a/README.md b/README.md new file mode 100644 index 0000000..a1fbc18 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# atp: a tcp proxy + +A simple TCP proxy written in rust. + +### why? + +In the past, I had nginx set up to serve my websites, and it also served as a TCP proxy for SSH. Recently, however, I switched to Caddy for HTTPS. Caddy, unfortunately, doesn't have a TCP proxy, so I had to keep nginx around for my proxying needs. I find this a bit overkill though, which is where `atp` comes in. + +### configuration + +The configuration is in the TOML format. A sample config follows: + +```toml +"192.168.1.28:6667" = 8000 +"192.168.1.48:1604" = 1604 +``` + +### running + +```sh +cargo run /path/to/config.toml +``` + +If no path is provided, `atp` will fall back to looking for `config.toml` in the current directory. + +TODO: +- [ ] more descriptive error messages +- [ ] use spawing + channels instead of `select!` +- [ ] on-the-fly config reload? +- [ ] UDP proxying? diff --git a/UNLICENSE b/UNLICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to