Skip to content

brackendawson/webcal-proxy

Repository files navigation

Go workflow

wp logo webcal-proxy

A simple server to filter events from webcal feeds.

Usage

Server

Arguments

Usage of webcal-proxy:

  • -addr string local address:port to bind to (default ":8080")
  • -logfile string File to log to
  • -log-level string log level (default "info")
  • -max-conns maximum total upstream connections
  • -dev disables security policies that prevent http://localhost from working

TLS

The server should be run behind a reverse proxy which terminates TLS because the webcal:// protocol requires valid TLS. The web interface will also not function on http without the -dev argument, even then some things will not work, such as clipboard interaction.

Proxy Path

If the reverse proxy uses a path then provide it in the X-Forwarded-URI header. Example nginx config:

location /webcal-proxy/ {
    proxy_pass          http://127.0.0.1:8080;
    rewrite             ^/webcal-proxy/(.*)$ /$1 break;
    proxy_set_header    Host    $host;
    proxy_set_header    X-Forwarded-URI /webcal-proxy;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_redirect      off;
    proxy_buffering     off;
}

Proxy Security

This server should be isolated at a network-level from egress to your infrastructure's private network, otherwise an attacker may be able to gain access to private services.

This server's HTTP client which fetches requested calendars does reject connection attempts to non-unicast and private addresses, but not other public unicast address ranges (including RFC 6598) which cloud providers may re-purpose for private networks.

Client

Enter the URL into your webcal client:

webcal://<this_server>/?cal=<webcal_url>[&inc=<query> ...][&exc=<query> ...][&mrg=true]

Where:

  • this_server is the address and path hosting this program.
  • cal your upstream webcal link, including the protocol scheme (webcal, http, https) (Required).
  • inc query for events to include in the form <FIELD>=<regexp> where FIELD is an iCal event field (eg SUMMARY) and regexp is an unbound regular expression. Multiple inc arguments are allowed, (default SUMMARY=.*).
  • exc query for events to exclude in the form <FIELD>=<regexp> where FIELD is an iCal event field (eg SUMMARY) and regexp is an unbound regular expression. Multiple inc arguments are allowed.
  • mrg optional parameter to merge overlapping events into the one event.

eg:

webcal://webcal-proxy.example.com/webcal-proxy?cal=webcal://example.com/my/calendar&exc=SUMMARY=Boring%20Events

About

A HTTP reverse proxy that filters events from any webcal feed

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors