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

Can be used as a server, not as a client, why? #1

Closed
Xixi0218 opened this issue Mar 26, 2023 · 16 comments
Closed

Can be used as a server, not as a client, why? #1

Xixi0218 opened this issue Mar 26, 2023 · 16 comments

Comments

@Xixi0218
Copy link

I use shoes as the server, and then use shoes as the client, but I can't connect

@Xixi0218
Copy link
Author

vmess

@Xixi0218
Copy link
Author

Please help me

@cfal
Copy link
Owner

cfal commented Mar 27, 2023

shoes is a server, although it can connect to other proxies for you. for example, you can set it up as a socks server, but use it to connect to a vmess server.

i've added another example here: https://github.com/cfal/shoes/blob/master/examples/socks_through_wss_vmess.yaml

@Xixi0218
Copy link
Author

shoes is a server, although it can connect to other proxies for you. for example, you can set it up as a socks server, but use it to connect to a vmess server.

i've added another example here: https://github.com/cfal/shoes/blob/master/examples/socks_through_wss_vmess.yaml

I use socks as the client and vmess as the proxy, and the link to v2ray will fail

@cfal
Copy link
Owner

cfal commented Mar 27, 2023

can you paste your configs?

@Xixi0218
Copy link
Author

can you paste your configs?

  • address: 127.0.0.1:1080
    protocol:
    type: socks
    rules:

    allow connections to all ips

    • mask: 0.0.0.0/0
      action: allow
      client_proxy:
      • address: 127.0.0.1:2000
        protocol:
        type: vmess
        cipher: any
        user_id: b831381d-6324-4d53-ad4f-8cda48b30811

@cfal
Copy link
Owner

cfal commented Mar 27, 2023

can you paste your vmess config?

@Xixi0218
Copy link
Author

can you paste your vmess config?

If you solve it, please tell me, I can pay you some USDT

@cfal
Copy link
Owner

cfal commented Mar 27, 2023

you have tls=1, so, you need to connect over TLS to the server:

- address: 127.0.0.1:1080
  protocol:
    type: socks
  rules:
    # allow connections to all ips
    mask: 0.0.0.0/0
    action: allow
    client_proxy:
      address: 127.0.0.1:2000
      protocol:
        type: tls
        verify: false
        protocol:
          type: vmess
          cipher: any
          user_id: b831381d-6324-4d53-ad4f-8cda48b30811

@Xixi0218
Copy link
Author

always failed

127.0.0.1:49190 finished with error: Custom { kind: UnexpectedEof, error: "failed to setup client stream to mon.snssdk.com:443: tls handshake eof" }

@cfal
Copy link
Owner

cfal commented Mar 27, 2023

it's hard for me to debug the problem without seeing the v2ray server config. can you paste it?

@Xixi0218
Copy link
Author

it's hard for me to debug the problem without seeing the v2ray server config. can you paste it?

{
  "log": {
    "loglevel": "debug"
  },
  "inbounds": [
    {
      "port": 2000,
      "listen": "127.0.0.1",
      "tag": "socks-inbound",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "b831381d-6324-4d53-ad4f-8cda48b30811"
          }
        ]
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    }
  ]
}

@Xixi0218
Copy link
Author

it's hard for me to debug the problem without seeing the v2ray server config. can you paste it?

You can run v2ray locally, use shoes to link, I found that it will time out

@cfal
Copy link
Owner

cfal commented Mar 27, 2023

i had forgotten about this - but you're correct, this won't work with v2ray's vmess server until #2 is resolved.

i've pushed a small update, so if you like, you can run a compatible shoes vmess server for now:

# Simple vmess server, supporting TCP and UDP-over-TCP.
- address: 127.0.0.1:2000
  transport: tcp
  protocol:
    type: vmess
    cipher: aes-128-gcm
    user_id: b831381d-6324-4d53-ad4f-8cda48b30811
  rules:
    - mask: 0.0.0.0/0
      action: allow
      # Direct connection, don't forward requests through another proxy.
      client_proxy: direct

@Xixi0218
Copy link
Author

i had forgotten about this - but you're correct, this won't work with v2ray's vmess server until #2 is resolved.

i've pushed a small update, so if you like, you can run a compatible shoes vmess server for now:

About when can I use shoes as a client

@cfal
Copy link
Owner

cfal commented Mar 27, 2023

this should now work.

@cfal cfal closed this as completed Mar 27, 2023
Repository owner deleted a comment from Xixi0218 Feb 23, 2024
Repository owner deleted a comment from Xixi0218 Feb 23, 2024
Repository owner deleted a comment from Xixi0218 Feb 23, 2024
Repository owner deleted a comment from Xixi0218 Feb 23, 2024
Repository owner deleted a comment from Xixi0218 Feb 23, 2024
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

2 participants