This commit is contained in:
MHSanaei 2024-07-12 00:20:06 +02:00 committed by GitHub
parent c69d38ae82
commit 16de0937a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 72 additions and 72 deletions

View file

@ -28,7 +28,7 @@ type Config struct {
// Path of the domain socket. This overrides the IP/Port parameter from
// upstream caller.
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
// Abstract speicifies whether to use abstract namespace or not.
// Abstract specifies whether to use abstract namespace or not.
// Traditionally Unix domain socket is file system based. Abstract domain
// socket can be used without acquiring file lock.
Abstract bool `protobuf:"varint,2,opt,name=abstract,proto3" json:"abstract,omitempty"`

View file

@ -10,7 +10,7 @@ message Config {
// Path of the domain socket. This overrides the IP/Port parameter from
// upstream caller.
string path = 1;
// Abstract speicifies whether to use abstract namespace or not.
// Abstract specifies whether to use abstract namespace or not.
// Traditionally Unix domain socket is file system based. Abstract domain
// socket can be used without acquiring file lock.
bool abstract = 2;

View file

@ -374,7 +374,7 @@ type Config struct {
unknownFields protoimpl.UnknownFields
// Settings for authenticating requests. If not set, client side will not send
// authenication header, and server side will bypass authentication.
// authentication header, and server side will bypass authentication.
Request *RequestConfig `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
// Settings for authenticating responses. If not set, client side will bypass
// authentication, and server side will not send authentication header.

View file

@ -56,7 +56,7 @@ message ResponseConfig {
message Config {
// Settings for authenticating requests. If not set, client side will not send
// authenication header, and server side will bypass authentication.
// authentication header, and server side will bypass authentication.
RequestConfig request = 1;
// Settings for authenticating responses. If not set, client side will bypass

View file

@ -2,18 +2,18 @@ package httpupgrade
import "net"
type connnection struct {
type connection struct {
net.Conn
remoteAddr net.Addr
}
func newConnection(conn net.Conn, remoteAddr net.Addr) *connnection {
return &connnection{
func newConnection(conn net.Conn, remoteAddr net.Addr) *connection {
return &connection{
Conn: conn,
remoteAddr: remoteAddr,
}
}
func (c *connnection) RemoteAddr() net.Addr {
func (c *connection) RemoteAddr() net.Addr {
return c.remoteAddr
}

View file

@ -1,6 +1,6 @@
package internet
// MemoryStreamConfig is a parsed form of StreamConfig. This is used to reduce number of Protobuf parsing.
// MemoryStreamConfig is a parsed form of StreamConfig. This is used to reduce the number of Protobuf parsings.
type MemoryStreamConfig struct {
ProtocolName string
ProtocolSettings interface{}

View file

@ -40,7 +40,7 @@ func ListenUnix(ctx context.Context, address net.Address, settings *MemoryStream
protocol := settings.ProtocolName
listenFunc := transportListenerCache[protocol]
if listenFunc == nil {
return nil, errors.New(protocol, " unix istener not registered.").AtError()
return nil, errors.New(protocol, " unix listener not registered.").AtError()
}
listener, err := listenFunc(ctx, address, net.Port(0), settings, handler)
if err != nil {