예제 #1
0
        public void Init(string updateSvcIP, string updatePlatform)
        {
            CLog.Here().Information($"- AppUpdaterService Initializing... : [UpdateSvcIP({updateSvcIP}), UpdatePlatform({updatePlatform})]");
            //SparkleInst = new SparkleUpdater($"https://{updateSvcIP}/NetSparkle/files/sample-app/appcast.xml", new DSAChecker(SecurityMode.Strict))
            SparkleInst = new SelfSparkleUpdater($"https://{updateSvcIP}/updatePlatform/{updatePlatform}/appcast.xml",
                                                 new Ed25519Checker(SecurityMode.Strict, null, "wwwroot/conf/Sparkling.service"))
            {
                UIFactory             = null,
                AppCastDataDownloader = new WebRequestAppCastDataDownloader(),
                RelaunchAfterUpdate   = true,
            };

            // TLS 1.2 required by GitHub (https://developer.github.com/changes/2018-02-01-weak-crypto-removal-notice/)
            SparkleInst.SecurityProtocolType = System.Net.SecurityProtocolType.Tls12;
            (SparkleInst.AppCastDataDownloader as WebRequestAppCastDataDownloader).TrustEverySSLConnection = true;
            SparkleInst.LogWriter = new SGAppUpdaterLogWriter();

            CLog.Here().Information($"- AppUpdaterService Initializing...Done : [UpdateSvcIP({updateSvcIP}), UpdatePlatform({updatePlatform})]");
        }