shadowsocks / shadowsocks/shadowsocks-org

[SIP] Add SOCKS Reply Field

Open
#144 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1k
Forks
694
PR merge metrics
No merged PRs in 30d

Description

The SOCKS5 protocol specifies a Reply Field that can be very useful to tell the client what happened to that connection to the destination. From the RFC:

Reply field:
             o  X'00' succeeded
             o  X'01' general SOCKS server failure
             o  X'02' connection not allowed by ruleset
             o  X'03' Network unreachable
             o  X'04' Host unreachable
             o  X'05' Connection refused
             o  X'06' TTL expired
             o  X'07' Command not supported
             o  X'08' Address type not supported
             o  X'09' to X'FF' unassigned

With this information the server can tell the client application the proper error. This is very useful in split horizon networks (to tell whether the destination is reachable and fallback to local) or to implement selective proxying with rules (and fallback to local access)

It would be great if Shadowsocks added that.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked RFC 1928 section 6 and review the issue discussion for the intended SOCKS5 Reply Field behavior. Identify the server and client entry points involved; done means destination failures are represented by the specified reply codes and the client can receive the resulting error.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.