User can set use aes or gzip

This commit is contained in:
Gogs
2016-06-14 16:58:53 +08:00
parent 740fb05b21
commit ab6c5c813e
7 changed files with 173 additions and 83 deletions

View File

@@ -122,10 +122,15 @@ func LoadConf(confFile string) (err error) {
}
// use_encryption
proxyClient.UseEncryption = false
proxyClient.UseEncryption = 0
useEncryptionStr, ok := section["use_encryption"]
if ok && useEncryptionStr == "true" {
proxyClient.UseEncryption = true
if ok {
tmpRes, err := strconv.Atoi(useEncryptionStr)
if err != nil {
proxyClient.UseEncryption = 0
}
proxyClient.UseEncryption = tmpRes
}
ProxyClients[proxyClient.Name] = proxyClient