Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/TuanKiri/socks5
A fully featured implementation of the SOCKS 5 protocol in golang.
CONNECT | BIND | UDP ASSOCIATE |
---|---|---|
✅ - implemented | 🛠 - in progress | ✅ - implemented |
go get github.com/TuanKiri/socks5
Create your .go
file. For example: main.go
.
package main
import (
"context"
"log"
"os/signal"
"syscall"
"github.com/TuanKiri/socks5"
)
func main() {
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop()
srv := socks5.New()
go func() {
if err := srv.ListenAndServe(); err != nil {
log.Fatal(err)
}
}()
<-ctx.Done()
if err := srv.Shutdown(); err != nil {
log.Fatal(err)
}
}
Run your server:
go run main.go
The following curl example shows how to use the proxy server:
curl -x socks5://127.0.0.1:1080 http://example.com
See the tests and examples for more information about package.
Why can't connect to socks proxy server?
Not all applications and browsers support socks authentication or socks protocol. You may need extension for Chrome or another browser.
If you have any questions, you can ask in GitHub Discussions.
Feel free to open tickets or send pull requests with improvements. Thanks in advance for your help!
Please follow the contribution guidelines.
All source code is licensed under the MIT License.
Logo is based on the Go Gopher mascot originally designed by Egon Elbre and which is also licensed under the CC0 1.0 Universal License.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.