File tree Expand file tree Collapse file tree 2 files changed +0
-48
lines changed Expand file tree Collapse file tree 2 files changed +0
-48
lines changed Original file line number Diff line number Diff line change @@ -448,45 +448,6 @@ let with_connect ?unique_id ?use_fork_exec_helper ?write_to_log ~verify_cert
448
448
)
449
449
5
450
450
451
- let with_client_proxy ~verify_cert ~remote_host ~remote_port ~local_host
452
- ~local_port f =
453
- ( try
454
- D. debug " Clean up running stunnel client proxy if there is any ..." ;
455
- let out, _ =
456
- Forkhelpers. execute_command_get_output " /usr/sbin/fuser"
457
- [" -4k" ; string_of_int local_port ^ " /tcp" ]
458
- in
459
- D. debug " Killed running stunnel client proxy:%s" out
460
- with
461
- | Forkhelpers. Spawn_internal_error (stderr , stdout , process_status ) -> (
462
- match process_status with
463
- | Unix. WEXITED 1 ->
464
- D. debug " No running stunnel client proxy"
465
- | _ ->
466
- D. warn
467
- " Cleaning up running stunnel client proxy returned unexpectedly: \
468
- stdout=(%s); stderr=(%s)"
469
- stdout stderr
470
- )
471
- ) ;
472
-
473
- retry
474
- (fun () ->
475
- let pid, _ =
476
- attempt_one_connect
477
- (`Local_host_port (local_host, local_port))
478
- verify_cert remote_host remote_port
479
- in
480
- D. debug " Started a client proxy (pid:%s): %s:%s -> %s:%s"
481
- (string_of_int (getpid pid))
482
- local_host (string_of_int local_port) remote_host
483
- (string_of_int remote_port) ;
484
- Xapi_stdext_pervasives.Pervasiveext. finally
485
- (fun () -> f () )
486
- (fun () -> disconnect_with_pid ~wait: false ~force: true pid)
487
- )
488
- 5
489
-
490
451
let with_client_proxy_systemd_service ~verify_cert ~remote_host ~remote_port
491
452
~local_host ~local_port ~service f =
492
453
let cmd_path = stunnel_path () in
Original file line number Diff line number Diff line change @@ -88,15 +88,6 @@ val with_moved_exn : t -> (t -> 'd) -> 'd
88
88
89
89
val safe_release : t -> unit
90
90
91
- val with_client_proxy :
92
- verify_cert :verification_config option
93
- -> remote_host :string
94
- -> remote_port :int
95
- -> local_host :string
96
- -> local_port :int
97
- -> (unit -> 'a )
98
- -> 'a
99
-
100
91
val with_client_proxy_systemd_service :
101
92
verify_cert :verification_config option
102
93
-> remote_host :string
You can’t perform that action at this time.
0 commit comments