justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 618 forks source link

root certificate path #895

Closed zhaoyanliang2 closed 2 years ago

zhaoyanliang2 commented 2 years ago

Discussed in https://github.com/justcoding121/titanium-web-proxy/discussions/894

Originally posted by **zhaoyanliang2** December 27, 2021 `Assembly.GetEntryAssembly().Location` returns an empty string in a single file application. https://github.com/justcoding121/titanium-web-proxy/blob/2825191dc8734108072e5f6af98b4a9ce3554492/src/Titanium.Web.Proxy/Certificates/Cache/DefaultCertificateDiskCache.cs#L129 https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file
honfika commented 2 years ago

Using AppContext.BaseDirectory in this case.