Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Support CLI arguments, exclude routes, DNS and MTU for Windows #27

Closed
kayrus opened this issue Mar 26, 2021 · 4 comments
Closed

Support CLI arguments, exclude routes, DNS and MTU for Windows #27

kayrus opened this issue Mar 26, 2021 · 4 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@kayrus
Copy link

kayrus commented Mar 26, 2021

Hi, I'm working on a similar project fork (https://github.com/eycorsican/go-tun2socks). I implemented some features I missed, but the upstream project is based on LwIP stack, which I don't like.

I'd happy to switch to your project, but it doesn't support features listed below:

  • MTU set for Windows (wireguard doesn't set it by default)
  • Exclude routes (CLI arg + config)
  • It would be nice if you make config file to be optional and allow specifying parameters via CLI args as well

I prepared a package to support this stuff: https://github.com/kayrus/tuncfg
Let me know if you want to embed it into your project

@kayrus kayrus changed the title Support custom routes, exclude routes, DNS and MTU for Windows Support CLI arguments, exclude routes, DNS and MTU for Windows Mar 26, 2021
@imgk
Copy link
Owner

imgk commented Mar 26, 2021

  • It is possible to add an option of setting MTU and DNS and it is easy to implement. PR is welcome.
  • Modifying the route table is complicated. Currently, shadow just supports adding an entry. But I'm not sure how to implement excluding routes.
  • As the main function is quite simple now. If you want to pass arguments via CLI, I suggest you write a customized main.go. I want to keep shadow simple and won't add too many args.

@imgk imgk added the enhancement New feature or request label Mar 26, 2021
@kayrus
Copy link
Author

kayrus commented Mar 26, 2021

Modifying the route table is complicated. Currently, shadow just supports adding an entry. But I'm not sure how to implement excluding routes

excluding routes is already implemented in my module

@imgk
Copy link
Owner

imgk commented Mar 26, 2021

Setting DNS is just applicable for Windows. So I won't add this feature. Setting MTU is fine. However, I DO not think it is necessary. I think adding an option to run PostUp and PostDown is a better way to modify the route table for excluding routes.

I have read your method about excluding routes. I doubt that adding these route entries may conflict with original ones.

@ghost
Copy link

ghost commented Mar 27, 2021

Hi, I'm working on a similar project fork (https://github.com/eycorsican/go-tun2socks). I implemented some features I missed, but the upstream project is based on LwIP stack, which I don't like.

I'd happy to switch to your project, but it doesn't support features listed below:

  • MTU set for Windows (wireguard doesn't set it by default)
  • Exclude routes (CLI arg + config)
  • It would be nice if you make config file to be optional and allow specifying parameters via CLI args as well

I prepared a package to support this stuff: https://github.com/kayrus/tuncfg
Let me know if you want to embed it into your project

何必纠结LwIP?tun2socks其实最难受的还是需要手动安装一次虚拟网卡,好像叫tap-windows。相比之下还是本项目的作者更为简单直接,一套cmd直接带走。

@imgk imgk added the wontfix This will not be worked on label Mar 30, 2021
@imgk imgk closed this as completed May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants