Skip to content

rclarey/socks5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A SOCKS5 proxy library for Deno

GitHub Workflow Status GitHub release (latest by date) Documentation Dependencies MIT License

Features

  • Supported commands

    • ✅ CONNECT
    • ❌ BIND
    • ✅ UDP ASSOCIATE
  • Supported authentication methods

    • No authentication
    • Username & password

Usage

import { Client } from "https://deno.land/x/socks5/client.ts";

const config = {
  // hostname of the proxy server
  hostname: "my-proxy-server.example",
  // optional, port of the proxy server. defaults to 1080
  port: 1234,
  // optional, username and password to authenticate. not required if
  // the server supports using no authentication
  username: "my_name",
  password: "my_password",
};
const client = new Client(config);

// now you can replace
Deno.connect(connectOpts);
// with
client.connect(connectOpts);

// and you can replace
Deno.listenDatagram(listenOpts);
// with
client.listenDatagram(listenOpts);