Files
openide/native/WslTools
Ilya.Kazakevich 2ca053a0cc PY-50751: Custom tool for wsl sync: support of dir symlinks
Symlinks on Windows are junctions (since no UAC required), so only directory symlinks are supported.

GitOrigin-RevId: 9f9134d59597d2987a7c1b95602dc6e477651dfb
2022-04-10 15:01:25 +00:00
..
2022-02-04 23:47:52 +00:00
2022-02-04 23:47:52 +00:00
2021-12-29 13:26:15 +00:00
2022-02-04 23:47:52 +00:00
2022-02-04 23:47:52 +00:00

This project creates two tools:

wslproxy (see wslproxy.svg)
To avoid connecting from WSL to Windows (such connections may be blocked by firewall) we connect from Windows to WSL instead.
This proxy accepts two clients: one for egress (eth0) and one for ingress (loopback). It then passes data between them with two threads.
It then reports IP and port via stdout
EOF (close stream) written to the stdin kills process.

wslhash
Calculates hashes and for all files in certain folder to implement custom rsync-like functionality. `rsync` may be missing on some WSL distros,
and also it may be slow: access from WSL to Windows takes a lot of time.
This tool runs on WSL only, so it is fast. See WslSync.kt
It also reports symbolic links

To build tool use Makefile. We link it statically because WSL may lack glibc. Kernel ABI is backward compatible, so use some old Linux

We use musl libc: https://musl.libc.org/
Not only it produces smaller binaries, but also it is MIT licenced, and we can't link statically with LGPL

Get musl automatically:
1. Run "make" (you must have `wget` installed)
2. Open project in CLion if you want

Getting musl manually:
1. Download .tar.gz from here: https://musl.libc.org/
2. unpack to "musl": ``tar xfz musl-1.2.2.tar.gz && mv musl-1.2.2 musl``
3. run "make"
4. Open project in CLion if you want

See https://wiki.musl-libc.org/getting-started.html for more info

Q: I got error opening project in CLion:
A: Make sure you run "make". Then, tools->Makefile->Reload