mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
added xNetStandard proxy example
This commit is contained in:
parent
f289b9e2e5
commit
4b4965a335
|
|
@ -237,6 +237,14 @@ client.TcpHandler = async (address, port) =>
|
||||||
var user = await client.LoginUserIfNeeded();
|
var user = await client.LoginUserIfNeeded();
|
||||||
Console.WriteLine($"We are logged-in as {user.username ?? user.first_name + " " + user.last_name}");
|
Console.WriteLine($"We are logged-in as {user.username ?? user.first_name + " " + user.last_name}");
|
||||||
```
|
```
|
||||||
|
or with [xNetStandard](https://www.nuget.org/packages/xNetStandard/):
|
||||||
|
```csharp
|
||||||
|
client.TcpHandler = async (address, port) =>
|
||||||
|
{
|
||||||
|
var proxy = xNet.Socks5ProxyClient.Parse("host:port:username:password");
|
||||||
|
return proxy.CreateConnection(address, port);
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
<a name="logging"></a>
|
<a name="logging"></a>
|
||||||
### Change logging settings
|
### Change logging settings
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue