Skip to content
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

error on hanle client: Neither a NATed or SOCKSv5 connection #28

Open
Baltazar500 opened this issue Jul 29, 2024 · 3 comments
Open

error on hanle client: Neither a NATed or SOCKSv5 connection #28

Baltazar500 opened this issue Jul 29, 2024 · 3 comments

Comments

@Baltazar500
Copy link

Baltazar500 commented Jul 29, 2024

Hi,

When redirecting traffic through iptables (using DNAT or REDIRECT), moproxy gives the message

[INFO] error on handle client: Neither a NATed or SOCKSv5 connection

However, it successfully passes SOCKS5 curl requests. In the same situation, transocks redirects traffic without issues. What could be the problem? The version I'm using is 0.3.9 or 0.3.12. The maximum version I can use is 0.3.12; versions higher on android 5.1 than this give an error

CANNOT LINK EXECUTABLE: cannot locate symbol "__register_atfork" referenced by "/data/bin/moproxy_0.4.1_linux_aarch64_android.bin"...

@sorz
Copy link
Owner

sorz commented Aug 8, 2024

Hi there,

So you use iptables on Android? Is transocks also use iptables with DNAT/REDIRECT?

I haven't test it on Android and not sure what may cause it.

@Baltazar500
Copy link
Author

So you use iptables on Android? Is transocks also use iptables with DNAT/REDIRECT?

Yes, the redirect via transocks works without problems. moproxy in the same mode receives "error on handle client: Neither a NATed or SOCKSv5 connection" :/

I haven't test it on Android and not sure what may cause it.

ОК :( ...

@tsundokul
Copy link

tsundokul commented Nov 15, 2024

I'm getting the same message on a MikroTik (arm64, DNAT)
For some reason it enters the socks5 logic

async fn accept_socks5(client: &mut TcpStream) -> io::Result<Destination> {
    // Not a NATed connection, treated as SOCKSv5
    // Parse version
    // TODO: add timeout
    // TODO: use buffered reader
    let ver = client.read_u8().await?;
    if ver != 0x05 {
        return error_invalid_input("Neither a NATed or SOCKSv5 connection");
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants