Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
GF-Huang authored Feb 9, 2021
1 parent 2c03793 commit 566817a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ Example

### TCP
```cs
using Socklient;


using var client = new SocksClient(IPAddress.Parse("xxx.xxx.xxx.xxx") /* or some server hostname or domain */,
1080 /* or other ports */);
await client.ConnectAsync("somewebsite.com", 80 /*or 443 or other ports*/);
var stream = client.GetStream();
// Read and Write on this stream
stream.ReadAsync(...)
strea.WriteAsync(...)
await stream.ReadAsync(...)
await stream.WriteAsync(...)
```

### UDP
```cs
using Socklient;


using var client = new SocksClient(IPAddress.Parse("xxx.xxx.xxx.xxx") /* or some server hostname or domain */,
1080 /* or other ports */);
// Usually, all personal users are NAT, so there is no way to determine the public IP and port they will use before sending.
Expand Down

0 comments on commit 566817a

Please sign in to comment.