tags: - gost categories: - informational comments: true

date: 2021-12-26 00:00:00

DESCRIPTION

gost: getting started

Retries - The number of retries after a failed connection through the proxy chain.

gost: code: chain.go

func (c *Chain) DialContext(ctx context.Context, network, address string, opts ...ChainOption) (conn net.Conn, err error) {
..
..
for i := 0; i < retries; i++ {
                conn, err = c.dialWithOptions(ctx, network, address, options)
                if err == nil {
                        break
                }
        }
..

Test the ‘retry’ parameter on tunnels with a single or multiple failing chain node.

Observations:

When using default ‘Retries 1’, a single failing node will result in 1st attempt always failing. 2nd attempt works. When ‘Retries’ is set to 2, a single failing node in a chain leg will not fail on 1st attempt.

The script below will create a test environment as follows.

Backend echo server - 127.0.0.200:9000 Backend terminating gost tunnel end point for server.

2 legs - chain nodes - 127.1.0.x and 127.2.0.x Can be considered as site 1 and site 2 networks.

Clients: gost terminating end - port 127.0.0.100:9000 Client test: Using netcat to connect to backend server.

ERRORS

VERIFICATION

Create folder Run script. Script will create all scripts required to run tests.

Testing:

mkdir /tmp/t
cd /tmp/t
create-gost-tunnel-test-env

COMMANDS

References