acp
stores config at $HOME/.config/acp/config.json
(%APPDATA%\acp\config.json
for Windows).
After changing config on one device, run acp --setup
to get the command for updating configs on other devices.
List of configurable options:
server
(default:"https://acp.deno.dev"
): Endpoint for coordinating rendezvousipv6
(default:false
): Establish P2P connection using IPv6 instead of IPv4. Note that both ends of a connection need to use the same IP protocol.ports
(default:[0]
): Local port(s) binding for connection rendezvous. This is useful if the device is in a network that configured to allow inbound connections only from specific ports. e.g.[0]
: bind to a random port;[9527]
: bind to port 9527;[0,9527]
: bind to a random port and port 9527.
strategy
(default:["tcp_punch"]
): List of dialers for connection attempts, ordered by preference. Available dialers:tcp_punch
: TCP hole-punchingtailscale
: TCP over Tailnet / Taildrop (requires Tailscale running)
upnp
(default:false
): Request UPnP port mapping from supported router. This may not work for random port.
Make sure that all devices share the same config for entries server
and ipv6
.
Since the service is simply one TypeScript file, the easiest way to deploy is to use Deno Deploy playground.
- Create a new playground project (you need a Deno Deploy account; the free plan is more than enough),
- Copy-paste this file.
- Pick a subdomain name or bind it to your own domain.
- Set
server
field of the acp config files to the domain. (See the Advanced options section above)
If you want to avoid cloud vendor lock-in, you can also run the service directly. By doing so, the only difference is that the service is running on a single endpoint.
- Install Deno
- Clone the repo and run
deno run --allow-net=:8000 edge/index.ts
- (Recommended) Set up an HTTPS reverse proxy
- Set
server
field of the acp config files to your domain. (See the Advanced options section above)
Acp supports stdin as input and stdout as output, and they need to be used in pair.
# sender
acp - < tmp-file
# receiver
acp -d - > tmp-file
Tailscale has a more robust NAT traversal implementation and distributed relay fallback, so it is guarenteed to make connections in all cases. Acp can use Tailscale as a transport backend if you have Tailscale running on both side.
If you have Tailscale running before installing acp, Tailscale support is automatically enabled for acp. Otherwise you can set strategy: ["tailscale","tcp-punch"]
in config to enable Tailscale support after installing Tailscale.