routy

command module
v0.0.0-...-bae0182 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 7 Imported by: 0

README

Routy McRouteface

Routy McRouteface is a speedy little Edge Proxy with deny list IP blocking and SSL integration with Let's Encrypt.

Installation

Ubuntu

You should be able to simply run sudo make install.

This will install the binary to /usr/local/bin and configure a deamon for you.

Everyone Else
go build . -o routy
sudo mv routy /usr/local/bin
sudo chgrp www-data /usr/local/bin/routy
sudo chmod g+x /usr/local/bin/routy

If your user does not have permission to run servers on ports 80 and 443:

sudo @iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo @iptables -A INPUT -p tcp --dport 443 -j ACCEPT

NOTE: If you already have wildcard SSL certificates from Let's Encrypt, copy them into either /var/routy/certs or $HOME/routy/certs.

Configuration And Logs

All configuration and log files are found in either /var/routy or $HOME/routy.

  • access.log: The log file for all incoming requests
  • certs: Directory containing the Let's Encrypt certificates
  • cfg.yaml: Basic configuration file for Routy
  • denyList.json: list of IP addresses to deny access to routes
  • events.log: The log file for all server events and information
cfg.yaml

The cfg.yaml file contains the configuration for the base hostname and subdomains. A typical configuration including a configuration for a websocket looks like this: The timeouts are in milliseconds. All websocket paths are /ws on their respective subdomains.

domains:
  - name: example.com
    paths:
      - location: /
        target: http://127.0.0.2
        upgrade: false
    subdomains:
      - name: foo
        paths:
          - location: /
            upgrade: false
            target: http://127.0.0.1
          - location: /ws
            upgrade: true
            target: http://127.0.0.1:1234
            listenPort: 1234
  - name: anotherexample.com
    subdomains:
      - name: flip
        paths:
          - location: /
            upgrade: false
            target: http://192.168.0.2
      - name: flop
        paths:
          - location: /
            upgrade: false
            target: https://192.168.0.6:8443
Deny List

A typical denyList.json file will look like this:

[
    "100.15.126.231",
    "100.19.145.164",
    "101.100.139.201",
    "27.33.100.62"
]

License

Licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL