
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
gRPC over HTTP and Websockets
NOTICE: The project is still in early stages of development, and not all gRPC functionality has been verified to work. Use at your own risk and contribute back if you find something that is missing.
gRPC is an amazing framework. But sometimes it is impossible to use due to the underlying transport layer. This project allows to use your already existing codebase, and add interceptors and a proxy to make your gRPC work over normal HTTP and Websockets - no generation necessary!
This example shows how to add go-plain-grpc to helloworld example from gRPC-go repository.
package main
import (
"net/url"
"google.golang.org/grpc"
"voy.technology/plain-grpc"
pb "google.golang.org/grpc/examples/helloworld/helloworld"
)
var endpointFlag = flag.String("endpoint", "", "Endpoint to the serve")
func main() {
flag.Parse()
// Error parsing removed for brevity
endpoint, _ := url.Parse(*endpointFlag)
opts := []grpc.DialOption{
grpc.WithInsecure(),
}
// gRPC doesn't like Scheme in front of the connection url. We can use it to
// our advantage to select when we want to use go-plain-grpc.
if endpoint.Scheme == "http" {
i := plaingrpc.NewHijacker(endpoint.String())
opts = append(opts,
grpc.WithUnaryInterceptor(i.UnaryInterceptor),
grpc.WithStreamInterceptor(i.StreamInterceptor))
}
conn, _ := grpc.Dial(entrypoint.String(), opts...)
defer conn.Close()
c := pb.NewGreeterClient(conn)
// Proceed as normal
}
package main
// These can be combined into a single service using cmux
var httpPortFlag = flag.Int("http-port", 8080, "HTTP port")
var grpcPortFlag = flag.Int("grpc-port", 8888, "gRPC port")
func main() {
flag.Parse()
lis, _ := net.Listen("tcp", fmt.Sprintf(":%d", *grpcPortFlag))
s := grpc.NewServer()
pb.RegisterGreeterServer(s, &server{})
go s.Serve(lis)
// Proxy forwards all requests from HTTP server to the gRPC server
proxy, _ := plaingrpc.NewProxy(s, lis.Addr())
// Register the endpoints
http.Handle("/", proxy)
http.ListenAndServe(fmt.Sprintf(":%d", *httpPortFlag), nil)
}
Special Thanks to Mike Cheng for grpc-over-http on which this project is roughly based on.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.