]> Git repositories of Nishi - koakuma.git/commitdiff
allow https
authorNishi <nishi@nishi.boats>
Tue, 1 Oct 2024 23:05:34 +0000 (23:05 +0000)
committerNishi <nishi@nishi.boats>
Tue, 1 Oct 2024 23:05:34 +0000 (23:05 +0000)
git-svn-id: file:///raid/svn-personal/koakuma/trunk@8 219d0f9c-2d94-d447-890a-813e76b88fe9

Tool/create-project.in
Utility/rpc.tcl

index 76d5d3a6b53b13e43568189c54ba4dd8f34a7624..5c6577c9a433251566ce2e5d2b944a77967b0bc8 100644 (file)
@@ -1,7 +1,6 @@
 #!/usr/bin/env tclsh
 # $Id$
 package require tdom
-set RPC_URL "http://127.0.0.1/koakuma/rpc"
 foreach arg $argv {
        if { [string range "$arg" 0 0] == "-" } {
                if { "$arg" == "-h" || "$arg" == "--help" } {
@@ -15,10 +14,6 @@ foreach arg $argv {
 foreach path [glob "@@PREFIX@@/lib/koakuma/utility/*.tcl"] {
        source $path
 }
-if { [info exists "env(KOAKUMA_RPC)"] } {
-       set RPC_URL "$env(KOAKUMA_RPC)"
-}
-set RPC_URL "[regsub {/+$} "$RPC_URL" ""]"
 puts -nonewline "Authentication: "
 set status [::rpc::require-auth]
 if { $status == 1 } {
index 16fa0fc955b59adc5bbe34a7e020b260c6bb27cf..849cb6429b74ecd1078c92ca699fcc6d237b5722 100644 (file)
@@ -3,6 +3,17 @@ package require http
 package require base64
 package require term::ansi::ctrl::unix
 
+catch {
+       package require tls
+       ::http::register https 443 ::tls::socket
+}
+
+set RPC_URL "http://127.0.0.1/koakuma/rpc"
+if { [info exists "env(KOAKUMA_RPC)"] } {
+       set RPC_URL "$env(KOAKUMA_RPC)"
+}
+set RPC_URL "[regsub {/+$} "$RPC_URL" ""]"
+
 namespace eval rpc {
        proc require-auth {} {
                global RPC_URL