YtFlow / Maple

A lightweight Universal Windows proxy app based on https://github.com/eycorsican/leaf
Apache License 2.0
1.19k stars 121 forks source link

Maple的日志文件目录在哪? #28

Closed HIMSHUAIBAOHONG closed 2 years ago

HIMSHUAIBAOHONG commented 2 years ago

Maple的日志文件目录在哪?

bdbai commented 2 years ago

默认情况下,日志只在挂载的调试器里显示。你可以在 [General] 一节加 logoutput 字段设置日志文件路径,例如

[General]
# Log are for debug only
loglevel = trace
logoutput = C:\Users\HIMSHUAIBAOHONG\AppData\Local\Packages\56263bdbai.Maple_gv14dyc9zj8pj\TempState\a.txt
# Do not remove tun option
tun = auto
dns-server = 8.8.8.8, 1.1.1.1

注意 UWP 的权限限制,路径必须是应用可写入的目录,比如 TempState

HIMSHUAIBAOHONG commented 2 years ago

怎么挂载调试器呢?

bdbai commented 2 years ago

可以参考 https://docs.microsoft.com/en-us/visualstudio/debugger/debug-installed-app-package?view=vs-2022

HIMSHUAIBAOHONG commented 2 years ago

是类似于这种吗?调试器输出里面的。 “Maple.App.exe”(Win32): 已加载“C:\Program Files\WindowsApps\56263bdbai.Maple_0.6.0.0_x64__gv14dyc9zj8pj\Maple.App.exe”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\ntdll.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\kernel32.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\KernelBase.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\ws2_32.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\rpcrt4.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\bcrypt.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\ucrtbase.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\combase.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\oleaut32.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\msvcp_win.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Windows\System32\IPHLPAPI.DLL”。 “Maple.App.exe”(Win32): 已加载“C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe\msvcp140_app.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe\vcruntime140_1_app.dll”。 “Maple.App.exe”(Win32): 已加载“C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe\vcruntime140_app.dll”。 程序“[16456] Maple.App.exe”已退出,返回值为 0 (0x0)。

bdbai commented 2 years ago

是的,Leaf 的日志会在 VPN 连接时开始输出。

Masood-Lapeh commented 1 year ago

I'm trying to see why Maple doesn't work with my trojan-go + ws setup. (It already worked for a simple trojan-gfw) I have set loglevel=info and also logoutput to a similar path as specified above, I tried to run it, but the file is still empty. Maybe I should change loglevel to something else?

bdbai commented 1 year ago

@Masood-Lapeh Try debug or trace

Masood-Lapeh commented 1 year ago

Still I can't see anything added to an empty a.txt. Just to make sure something is not wrong prior to that, Windows describes my Maple adapter as a 'WAN Miniport (SSTP)', whether it be created manually or generated. Does that look right?

bdbai commented 1 year ago

@Masood-Lapeh

Still I can't see anything added to an empty a.txt.

Is the log file accessible by Maple app? Note that a UWP app could not write into files located anywhere except the app package states (as shown in the previous example).

WAN Miniport (SSTP)

That looks correct.