@@ -25,19 +25,19 @@ let set_allowed_addresses ips =
2525 ));
2626 allowed_addresses := ips
2727
28- let errorf fmt = Fmt. kstrf (fun e -> Error (`Msg e)) fmt
29- let errorf' fmt = Fmt. kstrf (fun e -> Lwt. return (Error (`Msg e))) fmt
28+ let errorf fmt = Fmt. kstr (fun e -> Error (`Msg e)) fmt
29+ let errorf' fmt = Fmt. kstr (fun e -> Lwt. return (Error (`Msg e))) fmt
3030
3131module Port = struct
3232 type t = Forwarder.Frame.Destination .t
3333
3434 let to_string = function
3535 | `Tcp (ip , port ) ->
36- Fmt. strf " tcp:%a:%d" Ipaddr. pp ip port
36+ Fmt. str " tcp:%a:%d" Ipaddr. pp ip port
3737 | `Udp (ip , port ) ->
38- Fmt. strf " udp:%a:%d" Ipaddr. pp ip port
38+ Fmt. str " udp:%a:%d" Ipaddr. pp ip port
3939 | `Unix path ->
40- Fmt. strf " unix:%s" (Base64. encode_exn path)
40+ Fmt. str " unix:%s" (Base64. encode_exn path)
4141
4242 let of_string x =
4343 try
8080 let get_key t = t.local
8181
8282 let to_string t =
83- Fmt. strf " %s:%s" (Port. to_string t.local) (Port. to_string t.remote_port)
83+ Fmt. str " %s:%s" (Port. to_string t.local) (Port. to_string t.remote_port)
8484
8585 let description_of_format =
8686 " tcp:<local IP>:<local port>:tcp:<remote IP>:<remote port>
@@ -190,13 +190,13 @@ unix:<base64-encoded local path>:unix:<base64-encoded remote path>"
190190 let conn_read flow buf =
191191 Mux.Channel. read_into flow buf >> = function
192192 | Ok `Eof -> Lwt. fail End_of_file
193- | Error e -> Fmt. kstrf Lwt. fail_with " %a" Mux.Channel. pp_error e
193+ | Error e -> Fmt. kstr Lwt. fail_with " %a" Mux.Channel. pp_error e
194194 | Ok (`Data () ) -> Lwt. return ()
195195
196196 let conn_write flow buf =
197197 Mux.Channel. write flow buf >> = function
198198 | Error `Closed -> Lwt. fail End_of_file
199- | Error e -> Fmt. kstrf Lwt. fail_with " %a" Mux.Channel. pp_write_error e
199+ | Error e -> Fmt. kstr Lwt. fail_with " %a" Mux.Channel. pp_write_error e
200200 | Ok () -> Lwt. return ()
201201
202202 let start_udp_proxy description remote_port server =
@@ -293,7 +293,7 @@ unix:<base64-encoded local path>:unix:<base64-encoded remote path>"
293293 match t.local with
294294 | `Tcp (local_ip , local_port ) ->
295295 let description =
296- Fmt. strf " forwarding from tcp:%a:%d" Ipaddr. pp local_ip local_port
296+ Fmt. str " forwarding from tcp:%a:%d" Ipaddr. pp local_ip local_port
297297 in
298298 Lwt. catch (fun () ->
299299 check_bind_allowed local_ip >> = fun () ->
@@ -326,7 +326,7 @@ unix:<base64-encoded local path>:unix:<base64-encoded remote path>"
326326 )
327327 | `Udp (local_ip , local_port ) ->
328328 let description =
329- Fmt. strf " forwarding from udp:%a:%d" Ipaddr. pp local_ip local_port
329+ Fmt. str " forwarding from udp:%a:%d" Ipaddr. pp local_ip local_port
330330 in
331331 Lwt. catch (fun () ->
332332 check_bind_allowed local_ip >> = fun () ->
@@ -359,7 +359,7 @@ unix:<base64-encoded local path>:unix:<base64-encoded remote path>"
359359 )
360360 | `Unix path ->
361361 let description =
362- Fmt. strf " forwarding from unix:%s" path
362+ Fmt. str " forwarding from unix:%s" path
363363 in
364364 Lwt. catch (fun () ->
365365 Socket.Stream.Unix. bind ~description path
0 commit comments