portrelay

package
v0.7.25-dev.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package portrelay carries one TCP connection to a port of the container's own loopback over stdio: the runner execs it in the Coding agent's tools server for each connection to a port published on the person's computer. It reaches the container's own network namespace only, so it works however the container's network is set, and it imports only the standard library: the runner image compiles it from its embedded sources.

Index

Constants

View Source
const Role = "port-relay"

Role is the runner binary's mode that runs Pipe.

Variables

This section is empty.

Functions

func ParsePort

func ParsePort(s string) (int, error)

ParsePort reads a published port's number: 1024 to 65535, the ports a program in the container serves without privilege.

func Pipe

func Pipe(port int, in io.Reader, out io.Writer) error

Pipe connects to 127.0.0.1:port and copies in to the connection and the connection to out until either side ends. A port nothing listens on is an error, said on the caller's error stream; the person's browser then sees the connection close.

Types

This section is empty.

Jump to

Keyboard shortcuts

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