Interface IProxyMetadata
Provides access to connection metadata sent before the SSH handshake, such as PROXY protocol data.
Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions.Models
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public interface IProxyMetadata
Properties
| Edit this page View SourceAvailableBytes
Gets the number of bytes currently available in the pre-handshake buffer.
Declaration
int AvailableBytes { get; }
Property Value
| Type | Description |
|---|---|
| int |
CurrentReadPosition
Gets the current read position in the pre-handshake buffer.
Declaration
int CurrentReadPosition { get; }
Property Value
| Type | Description |
|---|---|
| int |
LocalAddress
Gets the local server address for the connection.
Declaration
string LocalAddress { get; }
Property Value
| Type | Description |
|---|---|
| string |
RemoteAddress
Gets the currently known remote address.
Declaration
string RemoteAddress { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceForceDisconnect(string)
Forces the connection to disconnect with a reason.
Declaration
void ForceDisconnect(string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| string | reason | The disconnect reason. |
GetHeader()
Returns a text header snapshot when one is available.
Declaration
string? GetHeader()
Returns
| Type | Description |
|---|---|
| string |
GetHostname()
Gets the current remote host name when available.
Declaration
string GetHostname()
Returns
| Type | Description |
|---|---|
| string |
GetRawBytes()
Returns the raw pre-handshake bytes currently available.
Declaration
byte[] GetRawBytes()
Returns
| Type | Description |
|---|---|
| byte[] |
ReadRawString()
Reads the available pre-handshake bytes as text.
Declaration
string ReadRawString()
Returns
| Type | Description |
|---|---|
| string |
Seek(int)
Moves the read position in the pre-handshake buffer.
Declaration
void Seek(int pos)
Parameters
| Type | Name | Description |
|---|---|---|
| int | pos | The absolute buffer position to move to. |
SetRealClientAddressAndPort(string, int)
Overrides the client address and port after proxy metadata is validated.
Declaration
void SetRealClientAddressAndPort(string address, int port)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | The real client address. |
| int | port | The real client source port. |
StoreAttribute(string, object?)
Stores application metadata on the connection.
Declaration
void StoreAttribute(string key, object? value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The metadata key. |
| object | value | The metadata value. |