-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOAX relay for remote measurement #286
base: main
Are you sure you want to change the base?
Changes from 14 commits
2704b35
b6cadf8
91c3b75
2cb1d4b
aeea243
cf93f5e
6238df9
01a5556
16702a5
26d2cf4
03ea5e9
9c085c4
3bf7af8
a637f41
b185b94
2f0dbde
78db65c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# SOCKS5 Proxy Relay for SOAX | ||
|
||
This program creates a SOCKS5 proxy relay that allows users to share access to SOAX without sharing their own credentials. It's designed for connectivity testing purposes. | ||
|
||
## Design | ||
|
||
The proxy relay works as follows: | ||
|
||
1. It listens for incoming SOCKS5 connections on a specified local address and port. | ||
2. It authenticates incoming connections using a custom authentication mechanism. | ||
3. For authenticated connections, it relays requests to the SOAX proxy server. | ||
4. It supports both TCP and UDP traffic. | ||
|
||
## Usage | ||
|
||
### Configuration | ||
|
||
The program uses a YAML configuration file (`config.yaml`) for settings. Please refer to the example config file. | ||
|
||
### Authentication | ||
Users connect to the relay using the following format: | ||
|
||
<b>Username:</b> | ||
|
||
username-country-{cc_code}-sessionid-{session_id}-sessionlength-{time_in_sec} | ||
|
||
where any part that goes after username-country-{cc_code} is optional. For more information on the format refer to [this document](https://helpcenter.soax.com/en/articles/6723733-sticky-sessions) on soax support page. | ||
|
||
<b>Password:</b> (as defined in the credentials section of the config file) | ||
|
||
<b>Example Username:</b> | ||
|
||
`outline-country-ru-sessionid-12-sessionlength-600` where `outline` is the username and parameters that goes after configured the soax proxy | ||
|
||
The relay will use the SOAX package ID and password to connect to the SOAX server, appending the country, sessionid, and sessionlength from the user's input. | ||
|
||
### Setup and Running | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is too complicated. You can just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I simplified the readme accordingly |
||
|
||
Ensure you have Go installed on your system. | ||
|
||
Create a `config.yaml` file in the project directory with your SOAX credentials and desired settings. | ||
|
||
```bash | ||
go run github.com/Jigsaw-Code/outline-sdk/x/examples/soax-relay@latest | ||
``` | ||
|
||
The relay will start and listen for incoming connections on the specified address and port. | ||
|
||
### SOAX Sticky Sessions | ||
|
||
This relay supports SOAX sticky sessions. Users can specify: | ||
|
||
1. country | ||
|
||
Two-letter country code (e.g., "us" for United States) | ||
|
||
2. sessionid | ||
|
||
A random string to maintain the same IP across requests | ||
|
||
3. sessionlength | ||
|
||
Duration of the session in seconds (10 to 3600) | ||
|
||
4. city | ||
|
||
City name. Example: new+york | ||
|
||
5. region | ||
|
||
Region name. Example: new+york | ||
|
||
6. isp | ||
|
||
ISP name. Please use this parameter together with the country information. | ||
|
||
For more information on the format for values please check out [this document](https://helpcenter.soax.com/en/articles/6723733-sticky-sessions) on soax support page. | ||
|
||
The relay will forward these parameters to SOAX, allowing users to benefit from sticky sessions without direct access to SOAX credentials. | ||
|
||
### Security Considerations | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, SOCKS5 is plaintext.... |
||
|
||
- This relay is intended for testing purposes only. | ||
- Ensure the relay is run in a secure environment, as it handles sensitive SOAX credentials. | ||
- Regularly update the credentials in the config file to maintain security. | ||
- SOCKS5 traffic is not encrypted. | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
server: | ||
tcp_listen_address: 0.0.0.0:1080 | ||
udp_listen_address: 0.0.0.0:9000 | ||
|
||
soax: | ||
package_id: 123456 | ||
package_key: MySoaxPackageKey | ||
|
||
credentials: | ||
user1: password1 | ||
user2: password2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert the transport changes. See below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fortuna please refer to my above comment.