GoSuda

Introducing Portalite: An ultra-lightweight open-source client and SDK for integrating portal Ingress into applications

By Lemon Mint
views ...

Previously, while introducing Portal, we discussed the issues of the modern web. Although the emergence of AI coding tools has enabled anyone to build a website, the task of publishing it to the world still remains within the monopolistic domain of mega-platforms and clouds. Portal is a project that separates web hosting from content creation, returning the right of publication back to individuals by connecting personal local services to the entire world via end-to-end encrypted relays.

Announcing Portalite

Today, I announce Portalite. Portalite is an ultra-lightweight Portal client and Go SDK constructed with minimal dependencies.

If Portal represents the philosophy of "how the web will be transformed," Portalite functions as the thinnest adhesive attaching that philosophy to a developer's application. Without complex cloud configurations or deployment pipelines, developers can import the SDK and incorporate portal ingress into their applications with merely a few lines of code. The moment the application executes, the server that previously existed solely on the local machine transforms into a public service accessible from anywhere on the internet.

1. Public Ingress Concluded in Two Lines of Code

Portalite supports net.Listener, which is the standard interface of Go. It operates immediately simply by replacing the listener in existing web framework or server code.

1identity, err := portalite.GenerateIdentity("my-service")
2
3listener, err := portalite.Expose(ctx, portalite.ExposeConfig{
4    Relays:   portalite.DefaultRelays(),
5    Identity: identity,
6})
7
8http.Serve(listener, handler)
  • Zero-config: There is absolutely no requirement for port forwarding, static IPs, or firewall inbound rule configurations.
  • Standard Compliant: It maintains 100% compatibility with all Go libraries utilizing standard net.Listener instances, such as http.Server, grpc.Server, Gin, Echo, and Chi.

2. Core: Multi-Relay Binding

Because the majority of tunneling tools depend on a single endpoint, the failure of a relay server results in the termination of the service. Portalite operates by connecting to multiple relay servers simultaneously.

  • Failover: Even if certain relays experience downtime or network latency, the remaining operational relays continue to ingest traffic via the identical virtual listener.
  • Elimination of Single Point of Failure (SPOF): Unless all relay sessions are severed simultaneously, the Accept() loop of the application remains uninterrupted.
  • End-to-End Encryption (E2EE): Because traffic is relayed in an encrypted state, relay servers are incapable of inspecting or tampering with the data.
  • Automatic Reconnection and Self-Healing: Even during transient network disconnections or relay reboots, sessions and tokens are automatically renegotiated in the background to restore connectivity.

3. Immediate Usage via a Single CLI Command

If the implementation is not in Go or if rapid testing is required, one merely needs to pass the port number to the CLI.

1$ go install gosuda.org/portalite/cmd/portalite@latest && portalite expose --name "my-service" 3000
2URL https://my-service.rly.best
3URL https://my-service.s-h.day
4

Multi-relay URLs are issued immediately upon execution of the command, rendering the service accessible from the exterior without delay.

4. Lightweight Yet Powerful Features

  • Minimal Dependencies: By reducing third-party dependencies, the resulting binary is lightweight and compilation is rapid.
  • TLS & UDP Support: In addition to TLS traffic such as HTTP and gRPC, UDP services such as game servers can be effortlessly exposed via QUIC datagram backhauls.

Getting Started