Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/traxys/lpr_proxy
A way to proxy lpr invocations through HTTP
https://github.com/traxys/lpr_proxy
Last synced: 9 days ago
JSON representation
A way to proxy lpr invocations through HTTP
- Host: GitHub
- URL: https://github.com/traxys/lpr_proxy
- Owner: traxys
- License: gpl-3.0
- Created: 2020-07-19T23:03:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T19:30:42.000Z (over 4 years ago)
- Last Synced: 2024-12-21T02:07:48.224Z (15 days ago)
- Language: Rust
- Size: 40 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LPR Proxy
## Why
This client/server is for forwarding `lpr` calls from one machine to the other, where each machine has the same sets of files.
The main use is when you want to call `lpr` from a docker but you don't want to bother managing `CUPS` in that docker## Usage
The client has the same options as `lpr`, with two more `--remote
` wich is the address of the remote server, and optionally `--prefix /some/path`, wich will remove from all invocations the said path, having canonicalized the paths first. This is intended to be the path in the docker where a volume is mounted.The server has an optional parameter, `./server --prefix /some/other/path`, if supplied all recieved invocations of `lpr` will have the files prefixed with this path. This is intended to be the path on the host where the volume is mounted
Beware that the server is completly unsecure, you can print any file you want, and there are no permissions. It should only be available to trusted sources. Even clients are not exactly secure, as without a `prefix` the paths are not checked to exist, and could contain `..` to set the server to `/` even with appending a prefix
## Configuration
You can specify `--listen ` and `--port ` for the server to tell on what interface to listen and what port. The default port can be changed in the source file if you don't want to specify it for both server & client
You can also specify `--port ` for the client
## Building
To build the client `cargo build --bin client --features reqwest`, to build the server `cargo build --bin server --features="warp tokio/process"`.