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

Why plugin only enabled for tcp? #626

Closed
videni opened this issue Sep 16, 2021 · 3 comments
Closed

Why plugin only enabled for tcp? #626

videni opened this issue Sep 16, 2021 · 3 comments

Comments

@videni
Copy link
Contributor

videni commented Sep 16, 2021

do we also need to enable plugin for UDP ? I don't have an use case, I am just curious why plugin is enabled for tcp only currently.


        if self.svr_cfg.mode().enable_tcp() {
            if let Some(plugin_cfg) = self.svr_cfg.plugin() {
                let plugin = Plugin::start(plugin_cfg, self.svr_cfg.addr(), PluginMode::Server)?;
                self.svr_cfg.set_plugin_addr(plugin.local_addr().into());
                vfut.push(
                    async move {
                        match plugin.join().await {
                            Ok(status) => {
                                error!("plugin exited with status: {}", status);
                                Ok(())
                            }
                            Err(err) => {
                                error!("plugin exited with error: {}", err);
                                Err(err)
                            }
                        }
                    }
                    .boxed(),
                );
            }

            let tcp_fut = self.run_tcp_server().boxed();
            vfut.push(tcp_fut);
        }
@zonyitoo
Copy link
Collaborator

shadowsocks/shadowsocks-org#28

b. Only TCP traffic is forwarded. For now, there is no plan to support UDP traffic forwarding.

This comment explains why.

@mazzz1y
Copy link

mazzz1y commented Oct 14, 2021

@zonyitoo

from explanation:

UDP over TCP expects very poor performance.

I can't confirm that. I agree that udp-over-tcp is not the most optimal way, but it works good. For example with pure Xray-VMess-WebSocket I can use udp voice streaming without any problem.

It will be very good if shadowsocks will add udp support for plugins.

@zonyitoo
Copy link
Collaborator

Please post your advices to the SIP003 issue.

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