Skip to content

Tun2ray state callback #9

Description

@Nyxil

Calling Libcore.newTun2ray(config) will cause the tun to get killed after a delay and not getting initialized as expected.
A Thread.sleep(2000) after calling newTun2ray will make it initialized and everything getting work very well.
I have created a new project and implemented everything from scratch, so i'm pretty sure the newTun2ray will get killed without a sleep after it (you can try it yourself)
I have also read the sagernet android app's source code and there are loops (sleeps) after this method which make it work (not getting killed).
I think should be a callback from the newTun2ray to be able to wait from kotlin side for tun to get initialized

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions