Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ftl/rigproxy
A proxy for Hamlib rigctld.
https://github.com/ftl/rigproxy
ham-radio hamlib hamradio
Last synced: 1 day ago
JSON representation
A proxy for Hamlib rigctld.
- Host: GitHub
- URL: https://github.com/ftl/rigproxy
- Owner: ftl
- License: mit
- Created: 2019-05-08T19:52:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T13:31:32.000Z (11 months ago)
- Last Synced: 2023-12-15T14:36:45.748Z (11 months ago)
- Topics: ham-radio, hamlib, hamradio
- Language: Go
- Size: 75.2 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rigproxy
[![GoDoc](https://godoc.org/github.com/ftl/rigproxy?status.svg)](https://godoc.org/github.com/ftl/rigproxy)
The rigproxy connects to a [Hamlib](https://github.com/Hamlib/Hamlib) `rigctld` server and accepts incoming connections from clients that speak the Hamlib net (model #2) protocol. Incoming requests are forwarded to the destination server, responses of reading requests are cached for a configurable amount of time.
The main purpose of rigproxy is to reduce the load on the destination server and rig by reducing the amount of reading requests if there run multiple clients concurrently.
In addition, rigproxy also contains a client library that allows to access `rigctld` servers through a native Go programming interface:
```go
conn, err := client.Open("localhost:4532")
if err != nil {
log.Fatal(err)
}
defer conn.Close()frequency, err := conn.Frequency(context.Background())
if err != nil {
log.Fatal(err)
}
log.Printf("current frequency: %.0fHz", frequency)
```See [godoc](https://godoc.org/github.com/ftl/rigproxy/pkg/client) for more information.
## Usage
`rigproxy` provides a CLI with the following flags:
* --destination -d # the address of the destination `rigctld` server
* --listen -l # the listening interface and port, `if` may be empty to bind to all available network interfaces
* --lifetime -L # the duration that responses to reading requests are cachedFor example:
```
rigproxy -d localhost:4534 -l :4532 -L 200ms
```## Development
To use your local copy of rigproxy in other projects, put the following into the go.mod file of your project:
```
replace github.com/ftl/rigproxy =>
```## Disclaimer
I develop this tool for myself and just for fun in my free time. If you find it useful, I'm happy to hear about that. If you have trouble using it, you have all the source code to fix the problem yourself (although pull requests are welcome).## License
This tool is published under the [MIT License](https://www.tldrlegal.com/l/mit).Copyright [Florian Thienel](http://thecodingflow.com/)