HttpsReverseProxyPort.cs 446 B

1234567891011121314151617
  1. using FastGithub.Configuration;
  2. using System;
  3. using System.Net.Sockets;
  4. namespace FastGithub.HttpServer
  5. {
  6. /// <summary>
  7. /// https反向代理端口
  8. /// </summary>
  9. static class HttpsReverseProxyPort
  10. {
  11. /// <summary>
  12. /// 获取端口值
  13. /// </summary>
  14. public static int Value { get; } = OperatingSystem.IsWindows() ? 443 : LocalMachine.GetAvailableTcpPort(AddressFamily.InterNetwork);
  15. }
  16. }