Skip to main content

Module api

Module api 

Source

Functions§

add_dnat
POST /dnat — Adds a static DNAT rule.
add_hairpin
POST /hairpin — Adds a static hairpin NAT rule.
add_mapping
POST /mapping/:container_id — Adds a new port mapping.
add_snat
POST /snat — Adds a static SNAT rule.
bind_ports
clear_all
DELETE /clear — Removes all managed NAT rules and resets daemon state.
list_mappings
GET /mappings — Returns all managed DNAT, SNAT, hairpin, and Docker mappings.
remap_port
PUT /remap/:container_id — Remaps a host port for a running container.
remove_dnat
DELETE /dnat — Removes a static DNAT rule.
remove_hairpin
DELETE /hairpin — Removes a static hairpin NAT rule.
remove_mapping
DELETE /mapping/{container_id}/{port} — Removes a specific port mapping by container and port.
remove_mapping_by_id
DELETE /mapping/by-id/:id — Removes a port mapping by its numeric ID.
remove_snat
DELETE /snat — Removes a static SNAT rule.
unbind_ports