Home

Awesome

Docker container for FRP server.

The image includes two useful server plugins that can be enabled dynamically. The first one is PortManager that maintains a persistent mapping of proxy ports in case the server is restarted. This way the ports will not be redistributed even if the image is upgraded. The second plugin is ACMEProxy, it uses Let's Encrypt (or any other ACME based certificate authority) to automatically secure exposed HTTP connections and redirect them to HTTPS.

Environment configuration:

Note that an external volume has to be mounted to /data to make the port reservations and certificates persistent.

LinkNotifier

Plugin can notify user of its active/inactive proxy ports via email. The following information must be provided when starting docker:

Template of the email must be provided in /data/notification_email.html.tpl. Template is run for each email notification and passes DisplayProxyList struct, which groups proxies of the same user. Active and Inactive group proxies with the same ContainerName for the given user.


type DisplayProxyList struct {
    Active      map[string][]ProxyInfo    `json:"active"`
    Inactive    map[string][]ProxyInfo    `json:"inactive"`
}

type ProxyInfo struct {
    Name          string     `json:"name"`
    ContainerName string     `json:"container_name"`
    ProxyType     string     `json:"proxy_type"`
    RemotePort    int        `json:"remote_port"`
    LocalPort     int        `json:"local_port"`
    Email         string     `json:"email"`
    ClientPrefix  string     `json:"frps_prefix"`
    Url           string     `json:"url"`
    Active        bool       `json:"active"`
    Notified      bool       `json:"notified"`
    
}

To activate the email notification, FRP client must provide the following meta data in its configuration for each proxy connection: