Browse Source

[i18n] update gettext file, add translation context, change comments

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1786/head
R4SAS 2 years ago
parent
commit
bc0cdaa669
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 388
      contrib/i18n/English.po
  2. 56
      daemon/HTTPServer.cpp
  3. 18
      libi2pd_client/HTTPProxy.cpp

388
contrib/i18n/English.po

@ -1,13 +1,13 @@
# i2pd # i2pd
# Copyright (C) 2021 PurpleI2P team # Copyright (C) 2021-2022 PurpleI2P team
# This file is distributed under the same license as the i2pd package. # This file is distributed under the same license as the i2pd package.
# R4SAS <r4sas@i2pmail.org>, 2021. # R4SAS <r4sas@i2pmail.org>, 2021-2022.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: i2pd\n" "Project-Id-Version: i2pd\n"
"Report-Msgid-Bugs-To: https://github.com/PurpleI2P/i2pd/issues\n" "Report-Msgid-Bugs-To: https://github.com/PurpleI2P/i2pd/issues\n"
"POT-Creation-Date: 2021-08-06 17:12\n" "POT-Creation-Date: 2022-07-26 21:22\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -18,706 +18,712 @@ msgstr ""
"X-Poedit-SearchPath-0: daemon/HTTPServer.cpp\n" "X-Poedit-SearchPath-0: daemon/HTTPServer.cpp\n"
"X-Poedit-SearchPath-1: libi2pd_client/HTTPProxy.cpp\n" "X-Poedit-SearchPath-1: libi2pd_client/HTTPProxy.cpp\n"
#: daemon/HTTPServer.cpp:177 #: daemon/HTTPServer.cpp:108
msgid "day" msgid "day"
msgid_plural "days" msgid_plural "days"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: daemon/HTTPServer.cpp:181 #: daemon/HTTPServer.cpp:112
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: daemon/HTTPServer.cpp:185 #: daemon/HTTPServer.cpp:116
msgid "minute" msgid "minute"
msgid_plural "minutes" msgid_plural "minutes"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: daemon/HTTPServer.cpp:188 #: daemon/HTTPServer.cpp:119
msgid "second" msgid "second"
msgid_plural "seconds" msgid_plural "seconds"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#. tr: Kibibit #. tr: Kibibit
#: daemon/HTTPServer.cpp:196 daemon/HTTPServer.cpp:224 #: daemon/HTTPServer.cpp:127 daemon/HTTPServer.cpp:155
msgid "KiB" msgid "KiB"
msgstr "" msgstr ""
#. tr: Mebibit #. tr: Mebibit
#: daemon/HTTPServer.cpp:198 #: daemon/HTTPServer.cpp:129
msgid "MiB" msgid "MiB"
msgstr "" msgstr ""
#. tr: Gibibit #. tr: Gibibit
#: daemon/HTTPServer.cpp:200 #: daemon/HTTPServer.cpp:131
msgid "GiB" msgid "GiB"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:217 #: daemon/HTTPServer.cpp:148
msgid "building" msgid "building"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:218 #: daemon/HTTPServer.cpp:149
msgid "failed" msgid "failed"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:219 #: daemon/HTTPServer.cpp:150
msgid "expiring" msgid "expiring"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:220 #: daemon/HTTPServer.cpp:151
msgid "established" msgid "established"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:221 #: daemon/HTTPServer.cpp:152
msgid "unknown" msgid "unknown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:223 #: daemon/HTTPServer.cpp:154
msgid "exploratory" msgid "exploratory"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:259 #. tr: Webconsole page title
#: daemon/HTTPServer.cpp:185
msgid "Purple I2P Webconsole"
msgstr ""
#: daemon/HTTPServer.cpp:190
msgid "<b>i2pd</b> webconsole" msgid "<b>i2pd</b> webconsole"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:262 #: daemon/HTTPServer.cpp:193
msgid "Main page" msgid "Main page"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:263 daemon/HTTPServer.cpp:725 #: daemon/HTTPServer.cpp:194 daemon/HTTPServer.cpp:700
msgid "Router commands" msgid "Router commands"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:264 daemon/HTTPServer.cpp:448 #: daemon/HTTPServer.cpp:195 daemon/HTTPServer.cpp:382
#: daemon/HTTPServer.cpp:460 #: daemon/HTTPServer.cpp:394
msgid "Local Destinations" msgid "Local Destinations"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:266 daemon/HTTPServer.cpp:418 #: daemon/HTTPServer.cpp:197 daemon/HTTPServer.cpp:352
#: daemon/HTTPServer.cpp:504 daemon/HTTPServer.cpp:510 #: daemon/HTTPServer.cpp:438 daemon/HTTPServer.cpp:444
#: daemon/HTTPServer.cpp:641 daemon/HTTPServer.cpp:684 #: daemon/HTTPServer.cpp:597 daemon/HTTPServer.cpp:640
#: daemon/HTTPServer.cpp:688 #: daemon/HTTPServer.cpp:644
msgid "LeaseSets" msgid "LeaseSets"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:268 daemon/HTTPServer.cpp:694 #: daemon/HTTPServer.cpp:199 daemon/HTTPServer.cpp:650
msgid "Tunnels" msgid "Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:269 daemon/HTTPServer.cpp:425 #: daemon/HTTPServer.cpp:201 daemon/HTTPServer.cpp:359
#: daemon/HTTPServer.cpp:787 daemon/HTTPServer.cpp:803 #: daemon/HTTPServer.cpp:770 daemon/HTTPServer.cpp:786
msgid "Transit Tunnels" msgid "Transit Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:270 daemon/HTTPServer.cpp:852 #: daemon/HTTPServer.cpp:203 daemon/HTTPServer.cpp:839
msgid "Transports" msgid "Transports"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:271 #: daemon/HTTPServer.cpp:204
msgid "I2P tunnels" msgid "I2P tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:273 daemon/HTTPServer.cpp:914 #: daemon/HTTPServer.cpp:206 daemon/HTTPServer.cpp:908
#: daemon/HTTPServer.cpp:924 #: daemon/HTTPServer.cpp:918
msgid "SAM sessions" msgid "SAM sessions"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:289 daemon/HTTPServer.cpp:1306 #: daemon/HTTPServer.cpp:222 daemon/HTTPServer.cpp:1302
#: daemon/HTTPServer.cpp:1309 daemon/HTTPServer.cpp:1312 #: daemon/HTTPServer.cpp:1305 daemon/HTTPServer.cpp:1308
#: daemon/HTTPServer.cpp:1326 daemon/HTTPServer.cpp:1371 #: daemon/HTTPServer.cpp:1322 daemon/HTTPServer.cpp:1367
#: daemon/HTTPServer.cpp:1374 daemon/HTTPServer.cpp:1377 #: daemon/HTTPServer.cpp:1370 daemon/HTTPServer.cpp:1373
msgid "ERROR" msgid "ERROR"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:296 #: daemon/HTTPServer.cpp:229
msgid "OK" msgid "OK"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:297 #: daemon/HTTPServer.cpp:230
msgid "Testing" msgid "Testing"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:298 #: daemon/HTTPServer.cpp:231
msgid "Firewalled" msgid "Firewalled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:299 daemon/HTTPServer.cpp:320 #: daemon/HTTPServer.cpp:232 daemon/HTTPServer.cpp:253
#: daemon/HTTPServer.cpp:406 #: daemon/HTTPServer.cpp:325
msgid "Unknown" msgid "Unknown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:300 daemon/HTTPServer.cpp:435 #: daemon/HTTPServer.cpp:233 daemon/HTTPServer.cpp:369
#: daemon/HTTPServer.cpp:436 daemon/HTTPServer.cpp:982 #: daemon/HTTPServer.cpp:370 daemon/HTTPServer.cpp:976
#: daemon/HTTPServer.cpp:991 #: daemon/HTTPServer.cpp:985
msgid "Proxy" msgid "Proxy"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:301 #: daemon/HTTPServer.cpp:234
msgid "Mesh" msgid "Mesh"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:304 #: daemon/HTTPServer.cpp:237
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:308 #: daemon/HTTPServer.cpp:241
msgid "Clock skew" msgid "Clock skew"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:311 #: daemon/HTTPServer.cpp:244
msgid "Offline" msgid "Offline"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:314 #: daemon/HTTPServer.cpp:247
msgid "Symmetric NAT" msgid "Symmetric NAT"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:326 #: daemon/HTTPServer.cpp:259
msgid "Uptime" msgid "Uptime"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:329 #: daemon/HTTPServer.cpp:262
msgid "Network status" msgid "Network status"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:334 #: daemon/HTTPServer.cpp:267
msgid "Network status v6" msgid "Network status v6"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:340 daemon/HTTPServer.cpp:347 #: daemon/HTTPServer.cpp:273 daemon/HTTPServer.cpp:280
msgid "Stopping in" msgid "Stopping in"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:354 #: daemon/HTTPServer.cpp:287
msgid "Family" msgid "Family"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:355 #: daemon/HTTPServer.cpp:288
msgid "Tunnel creation success rate" msgid "Tunnel creation success rate"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:356 #: daemon/HTTPServer.cpp:289
msgid "Received" msgid "Received"
msgstr "" msgstr ""
#. tr: Kibibit/s #. tr: Kibibit/s
#: daemon/HTTPServer.cpp:358 daemon/HTTPServer.cpp:361 #: daemon/HTTPServer.cpp:291 daemon/HTTPServer.cpp:294
#: daemon/HTTPServer.cpp:364 #: daemon/HTTPServer.cpp:297
msgid "KiB/s" msgid "KiB/s"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:359 #: daemon/HTTPServer.cpp:292
msgid "Sent" msgid "Sent"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:362 #: daemon/HTTPServer.cpp:295
msgid "Transit" msgid "Transit"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:365 #: daemon/HTTPServer.cpp:298
msgid "Data path" msgid "Data path"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:368 #: daemon/HTTPServer.cpp:301
msgid "Hidden content. Press on text to see." msgid "Hidden content. Press on text to see."
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:371 #: daemon/HTTPServer.cpp:304
msgid "Router Ident" msgid "Router Ident"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:373 #: daemon/HTTPServer.cpp:306
msgid "Router Family" msgid "Router Family"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:374 #: daemon/HTTPServer.cpp:307
msgid "Router Caps" msgid "Router Caps"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:375 #: daemon/HTTPServer.cpp:308
msgid "Version" msgid "Version"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:376 #: daemon/HTTPServer.cpp:309
msgid "Our external address" msgid "Our external address"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:384 #: daemon/HTTPServer.cpp:337
msgid "supported" msgid "supported"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:416 #: daemon/HTTPServer.cpp:350
msgid "Routers" msgid "Routers"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:417 #: daemon/HTTPServer.cpp:351
msgid "Floodfills" msgid "Floodfills"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:424 daemon/HTTPServer.cpp:968 #: daemon/HTTPServer.cpp:358 daemon/HTTPServer.cpp:962
msgid "Client Tunnels" msgid "Client Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:434 #: daemon/HTTPServer.cpp:368
msgid "Services" msgid "Services"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:435 daemon/HTTPServer.cpp:436 #: daemon/HTTPServer.cpp:369 daemon/HTTPServer.cpp:370
#: daemon/HTTPServer.cpp:437 daemon/HTTPServer.cpp:438 #: daemon/HTTPServer.cpp:371 daemon/HTTPServer.cpp:372
#: daemon/HTTPServer.cpp:439 daemon/HTTPServer.cpp:440 #: daemon/HTTPServer.cpp:373 daemon/HTTPServer.cpp:374
msgid "Enabled" msgid "Enabled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:435 daemon/HTTPServer.cpp:436 #: daemon/HTTPServer.cpp:369 daemon/HTTPServer.cpp:370
#: daemon/HTTPServer.cpp:437 daemon/HTTPServer.cpp:438 #: daemon/HTTPServer.cpp:371 daemon/HTTPServer.cpp:372
#: daemon/HTTPServer.cpp:439 daemon/HTTPServer.cpp:440 #: daemon/HTTPServer.cpp:373 daemon/HTTPServer.cpp:374
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:483 #: daemon/HTTPServer.cpp:417
msgid "Encrypted B33 address" msgid "Encrypted B33 address"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:492 #: daemon/HTTPServer.cpp:426
msgid "Address registration line" msgid "Address registration line"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:497 #: daemon/HTTPServer.cpp:431
msgid "Domain" msgid "Domain"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:498 #: daemon/HTTPServer.cpp:432
msgid "Generate" msgid "Generate"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:499 #: daemon/HTTPServer.cpp:433
msgid "" msgid ""
"<b>Note:</b> result string can be used only for registering 2LD domains " "<b>Note:</b> result string can be used only for registering 2LD domains "
"(example.i2p). For registering subdomains please use i2pd-tools." "(example.i2p). For registering subdomains please use i2pd-tools."
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:505 #: daemon/HTTPServer.cpp:439
msgid "Address" msgid "Address"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:505 #: daemon/HTTPServer.cpp:439
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:505 #: daemon/HTTPServer.cpp:439
msgid "EncType" msgid "EncType"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:515 daemon/HTTPServer.cpp:699 #: daemon/HTTPServer.cpp:449 daemon/HTTPServer.cpp:655
msgid "Inbound tunnels" msgid "Inbound tunnels"
msgstr "" msgstr ""
#. tr: Milliseconds #. tr: Milliseconds
#: daemon/HTTPServer.cpp:520 daemon/HTTPServer.cpp:530 #: daemon/HTTPServer.cpp:464 daemon/HTTPServer.cpp:484
#: daemon/HTTPServer.cpp:704 daemon/HTTPServer.cpp:714 #: daemon/HTTPServer.cpp:669 daemon/HTTPServer.cpp:689
msgid "ms" msgid "ms"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:525 daemon/HTTPServer.cpp:709 #: daemon/HTTPServer.cpp:469 daemon/HTTPServer.cpp:674
msgid "Outbound tunnels" msgid "Outbound tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:537 #: daemon/HTTPServer.cpp:491
msgid "Tags" msgid "Tags"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:537 #: daemon/HTTPServer.cpp:491
msgid "Incoming" msgid "Incoming"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:544 daemon/HTTPServer.cpp:547 #: daemon/HTTPServer.cpp:498 daemon/HTTPServer.cpp:501
msgid "Outgoing" msgid "Outgoing"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:545 daemon/HTTPServer.cpp:561 #: daemon/HTTPServer.cpp:499 daemon/HTTPServer.cpp:515
msgid "Destination" msgid "Destination"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:545 #: daemon/HTTPServer.cpp:499
msgid "Amount" msgid "Amount"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:552 #: daemon/HTTPServer.cpp:506
msgid "Incoming Tags" msgid "Incoming Tags"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:560 daemon/HTTPServer.cpp:563 #: daemon/HTTPServer.cpp:514 daemon/HTTPServer.cpp:517
msgid "Tags sessions" msgid "Tags sessions"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:561 #: daemon/HTTPServer.cpp:515
msgid "Status" msgid "Status"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:570 daemon/HTTPServer.cpp:626 #: daemon/HTTPServer.cpp:524 daemon/HTTPServer.cpp:582
msgid "Local Destination" msgid "Local Destination"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:580 daemon/HTTPServer.cpp:947 #: daemon/HTTPServer.cpp:535 daemon/HTTPServer.cpp:941
msgid "Streams" msgid "Streams"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:602 #: daemon/HTTPServer.cpp:558
msgid "Close stream" msgid "Close stream"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:631 #: daemon/HTTPServer.cpp:587
msgid "I2CP session not found" msgid "I2CP session not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:634 #: daemon/HTTPServer.cpp:590
msgid "I2CP is not enabled" msgid "I2CP is not enabled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:660 #: daemon/HTTPServer.cpp:616
msgid "Invalid" msgid "Invalid"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:663 #: daemon/HTTPServer.cpp:619
msgid "Store type" msgid "Store type"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:664 #: daemon/HTTPServer.cpp:620
msgid "Expires" msgid "Expires"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:669 #: daemon/HTTPServer.cpp:625
msgid "Non Expired Leases" msgid "Non Expired Leases"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:672 #: daemon/HTTPServer.cpp:628
msgid "Gateway" msgid "Gateway"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:673 #: daemon/HTTPServer.cpp:629
msgid "TunnelID" msgid "TunnelID"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:674 #: daemon/HTTPServer.cpp:630
msgid "EndDate" msgid "EndDate"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:684 #: daemon/HTTPServer.cpp:640
msgid "not floodfill" msgid "not floodfill"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:695 #: daemon/HTTPServer.cpp:651
msgid "Queue size" msgid "Queue size"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:726 #: daemon/HTTPServer.cpp:701
msgid "Run peer test" msgid "Run peer test"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:731 #: daemon/HTTPServer.cpp:706
msgid "Decline transit tunnels" msgid "Decline transit tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:733 #: daemon/HTTPServer.cpp:708
msgid "Accept transit tunnels" msgid "Accept transit tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:737 daemon/HTTPServer.cpp:742 #: daemon/HTTPServer.cpp:712 daemon/HTTPServer.cpp:717
msgid "Cancel graceful shutdown" msgid "Cancel graceful shutdown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:739 daemon/HTTPServer.cpp:744 #: daemon/HTTPServer.cpp:714 daemon/HTTPServer.cpp:719
msgid "Start graceful shutdown" msgid "Start graceful shutdown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:747 #: daemon/HTTPServer.cpp:722
msgid "Force shutdown" msgid "Force shutdown"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:748 #: daemon/HTTPServer.cpp:723
msgid "Reload external CSS styles" msgid "Reload external CSS styles"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:751 #: daemon/HTTPServer.cpp:726
msgid "" msgid ""
"<b>Note:</b> any action done here are not persistent and not changes your " "<b>Note:</b> any action done here are not persistent and not changes your "
"config files." "config files."
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:753 #: daemon/HTTPServer.cpp:728
msgid "Logging level" msgid "Logging level"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:761 #: daemon/HTTPServer.cpp:736
msgid "Transit tunnels limit" msgid "Transit tunnels limit"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:766 daemon/HTTPServer.cpp:778 #: daemon/HTTPServer.cpp:741 daemon/HTTPServer.cpp:760
msgid "Change" msgid "Change"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:770 #: daemon/HTTPServer.cpp:748
msgid "Change language" msgid "Change language"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:803 #: daemon/HTTPServer.cpp:786
msgid "no transit tunnels currently built" msgid "no transit tunnels currently built"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:908 daemon/HTTPServer.cpp:931 #: daemon/HTTPServer.cpp:902 daemon/HTTPServer.cpp:925
msgid "SAM disabled" msgid "SAM disabled"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:924 #: daemon/HTTPServer.cpp:918
msgid "no sessions currently running" msgid "no sessions currently running"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:937 #: daemon/HTTPServer.cpp:931
msgid "SAM session not found" msgid "SAM session not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:942 #: daemon/HTTPServer.cpp:936
msgid "SAM Session" msgid "SAM Session"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:999 #: daemon/HTTPServer.cpp:993
msgid "Server Tunnels" msgid "Server Tunnels"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1015 #: daemon/HTTPServer.cpp:1009
msgid "Client Forwards" msgid "Client Forwards"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1029 #: daemon/HTTPServer.cpp:1023
msgid "Server Forwards" msgid "Server Forwards"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1227 #: daemon/HTTPServer.cpp:1223
msgid "Unknown page" msgid "Unknown page"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1246 #: daemon/HTTPServer.cpp:1242
msgid "Invalid token" msgid "Invalid token"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1304 daemon/HTTPServer.cpp:1361 #: daemon/HTTPServer.cpp:1300 daemon/HTTPServer.cpp:1357
#: daemon/HTTPServer.cpp:1401 #: daemon/HTTPServer.cpp:1397
msgid "SUCCESS" msgid "SUCCESS"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1304 #: daemon/HTTPServer.cpp:1300
msgid "Stream closed" msgid "Stream closed"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1306 #: daemon/HTTPServer.cpp:1302
msgid "Stream not found or already was closed" msgid "Stream not found or already was closed"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1309 #: daemon/HTTPServer.cpp:1305
msgid "Destination not found" msgid "Destination not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1312 #: daemon/HTTPServer.cpp:1308
msgid "StreamID can't be null" msgid "StreamID can't be null"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1314 daemon/HTTPServer.cpp:1379 #: daemon/HTTPServer.cpp:1310 daemon/HTTPServer.cpp:1375
msgid "Return to destination page" msgid "Return to destination page"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1315 daemon/HTTPServer.cpp:1328 #: daemon/HTTPServer.cpp:1311 daemon/HTTPServer.cpp:1324
#: daemon/HTTPServer.cpp:1403 #: daemon/HTTPServer.cpp:1399
msgid "You will be redirected in 5 seconds" msgid "You will be redirected in 5 seconds"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1326 #: daemon/HTTPServer.cpp:1322
msgid "Transit tunnels count must not exceed 65535" msgid "Transit tunnels count must not exceed 65535"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1327 daemon/HTTPServer.cpp:1402 #: daemon/HTTPServer.cpp:1323 daemon/HTTPServer.cpp:1398
msgid "Back to commands list" msgid "Back to commands list"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1363 #: daemon/HTTPServer.cpp:1359
msgid "Register at reg.i2p" msgid "Register at reg.i2p"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1364 #: daemon/HTTPServer.cpp:1360
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1364 #: daemon/HTTPServer.cpp:1360
msgid "A bit information about service on domain" msgid "A bit information about service on domain"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1365 #: daemon/HTTPServer.cpp:1361
msgid "Submit" msgid "Submit"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1371 #: daemon/HTTPServer.cpp:1367
msgid "Domain can't end with .b32.i2p" msgid "Domain can't end with .b32.i2p"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1374 #: daemon/HTTPServer.cpp:1370
msgid "Domain must end with .i2p" msgid "Domain must end with .i2p"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1377 #: daemon/HTTPServer.cpp:1373
msgid "Such destination is not found" msgid "Such destination is not found"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1397 #: daemon/HTTPServer.cpp:1393
msgid "Unknown command" msgid "Unknown command"
msgstr "" msgstr ""
#: daemon/HTTPServer.cpp:1401 #: daemon/HTTPServer.cpp:1397
msgid "Command accepted" msgid "Command accepted"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:157 #: libi2pd_client/HTTPProxy.cpp:163
msgid "Proxy error" msgid "Proxy error"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:165 #: libi2pd_client/HTTPProxy.cpp:171
msgid "Proxy info" msgid "Proxy info"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:173 #: libi2pd_client/HTTPProxy.cpp:179
msgid "Proxy error: Host not found" msgid "Proxy error: Host not found"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:174 #: libi2pd_client/HTTPProxy.cpp:180
msgid "Remote host not found in router's addressbook" msgid "Remote host not found in router's addressbook"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:175 #: libi2pd_client/HTTPProxy.cpp:181
msgid "You may try to find this host on jump services below" msgid "You may try to find this host on jump services below"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:273 libi2pd_client/HTTPProxy.cpp:288 #: libi2pd_client/HTTPProxy.cpp:282 libi2pd_client/HTTPProxy.cpp:297
#: libi2pd_client/HTTPProxy.cpp:322 libi2pd_client/HTTPProxy.cpp:365 #: libi2pd_client/HTTPProxy.cpp:331 libi2pd_client/HTTPProxy.cpp:372
msgid "Invalid request" msgid "Invalid request"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:273 #: libi2pd_client/HTTPProxy.cpp:282
msgid "Proxy unable to parse your request" msgid "Proxy unable to parse your request"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:288 #: libi2pd_client/HTTPProxy.cpp:297
msgid "addresshelper is not supported" msgid "addresshelper is not supported"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:297 libi2pd_client/HTTPProxy.cpp:306 #: libi2pd_client/HTTPProxy.cpp:306 libi2pd_client/HTTPProxy.cpp:315
#: libi2pd_client/HTTPProxy.cpp:385 #: libi2pd_client/HTTPProxy.cpp:392
msgid "Host" msgid "Host"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:297 #: libi2pd_client/HTTPProxy.cpp:306
msgid "added to router's addressbook from helper" msgid "added to router's addressbook from helper"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:298 #: libi2pd_client/HTTPProxy.cpp:307
msgid "Click here to proceed:" msgid "Click here to proceed:"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:298 libi2pd_client/HTTPProxy.cpp:308 #: libi2pd_client/HTTPProxy.cpp:307 libi2pd_client/HTTPProxy.cpp:317
msgid "Continue" msgid "Continue"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:299 libi2pd_client/HTTPProxy.cpp:309 #: libi2pd_client/HTTPProxy.cpp:308 libi2pd_client/HTTPProxy.cpp:318
msgid "Addresshelper found" msgid "Addresshelper found"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:306 #: libi2pd_client/HTTPProxy.cpp:315
msgid "already in router's addressbook" msgid "already in router's addressbook"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:307 #. tr: The "record" means addressbook's record. That message appears when domain was already added to addressbook, but helper link is opened for it.
#: libi2pd_client/HTTPProxy.cpp:316
msgid "Click here to update record:" msgid "Click here to update record:"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:322 #: libi2pd_client/HTTPProxy.cpp:331
msgid "invalid request uri" msgid "invalid request uri"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:365 #: libi2pd_client/HTTPProxy.cpp:372
msgid "Can't detect destination host from request" msgid "Can't detect destination host from request"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:382 libi2pd_client/HTTPProxy.cpp:386 #: libi2pd_client/HTTPProxy.cpp:389 libi2pd_client/HTTPProxy.cpp:393
msgid "Outproxy failure" msgid "Outproxy failure"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:382 #: libi2pd_client/HTTPProxy.cpp:389
msgid "bad outproxy settings" msgid "bad outproxy settings"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:385 #: libi2pd_client/HTTPProxy.cpp:392
msgid "not inside I2P network, but outproxy is not enabled" msgid "not inside I2P network, but outproxy is not enabled"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:474 #: libi2pd_client/HTTPProxy.cpp:482
msgid "unknown outproxy url" msgid "unknown outproxy url"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:480 #: libi2pd_client/HTTPProxy.cpp:490
msgid "cannot resolve upstream proxy" msgid "cannot resolve upstream proxy"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:488 #: libi2pd_client/HTTPProxy.cpp:498
msgid "hostname too long" msgid "hostname too long"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:515 #: libi2pd_client/HTTPProxy.cpp:525
msgid "cannot connect to upstream socks proxy" msgid "cannot connect to upstream socks proxy"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:521 #: libi2pd_client/HTTPProxy.cpp:531
msgid "Cannot negotiate with socks proxy" msgid "Cannot negotiate with socks proxy"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:563 #: libi2pd_client/HTTPProxy.cpp:573
msgid "CONNECT error" msgid "CONNECT error"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:563 #: libi2pd_client/HTTPProxy.cpp:573
msgid "Failed to Connect" msgid "Failed to Connect"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:574 libi2pd_client/HTTPProxy.cpp:600 #: libi2pd_client/HTTPProxy.cpp:584 libi2pd_client/HTTPProxy.cpp:610
msgid "socks proxy error" msgid "socks proxy error"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:582 #: libi2pd_client/HTTPProxy.cpp:592
msgid "failed to send request to upstream" msgid "failed to send request to upstream"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:603 #: libi2pd_client/HTTPProxy.cpp:613
msgid "No Reply From socks proxy" msgid "No Reply From socks proxy"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:610 #: libi2pd_client/HTTPProxy.cpp:620
msgid "cannot connect" msgid "cannot connect"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:610 #: libi2pd_client/HTTPProxy.cpp:620
msgid "http out proxy not implemented" msgid "http out proxy not implemented"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:611 #: libi2pd_client/HTTPProxy.cpp:621
msgid "cannot connect to upstream http proxy" msgid "cannot connect to upstream http proxy"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:644 #: libi2pd_client/HTTPProxy.cpp:654
msgid "Host is down" msgid "Host is down"
msgstr "" msgstr ""
#: libi2pd_client/HTTPProxy.cpp:644 #: libi2pd_client/HTTPProxy.cpp:654
msgid "" msgid ""
"Can't create connection to requested host, it may be down. Please try again " "Can't create connection to requested host, it may be down. Please try again "
"later." "later."

56
daemon/HTTPServer.cpp

@ -182,7 +182,7 @@ namespace http {
" <meta charset=\"UTF-8\">\r\n" " <meta charset=\"UTF-8\">\r\n"
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n" " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n"
" <link rel=\"shortcut icon\" href=\"" << itoopieFavicon << "\">\r\n" " <link rel=\"shortcut icon\" href=\"" << itoopieFavicon << "\">\r\n"
" <title>" << tr("Purple I2P Webconsole") << "</title>\r\n"; " <title>" << tr(/* tr: Webconsole page title */ "Purple I2P Webconsole") << "</title>\r\n";
GetStyles(s); GetStyles(s);
s << s <<
"</head>\r\n" "</head>\r\n"
@ -531,19 +531,21 @@ namespace http {
ShowLeaseSetDestination (s, dest, token); ShowLeaseSetDestination (s, dest, token);
// Print table with streams information // Print table with streams information
s << "<table>\r\n<caption>" << tr("Streams") << "</caption>\r\n<thead>\r\n<tr>"; s << "<table>\r\n<caption>"
s << "<th style=\"width:25px;\">StreamID</th>"; << tr("Streams")
s << "<th style=\"width:5px;\" \\>"; // Stream closing button column << "</caption>\r\n<thead>\r\n<tr>"
s << "<th class=\"streamdest\">Destination</th>"; << "<th style=\"width:25px;\">StreamID</th>"
s << "<th>Sent</th>"; << "<th style=\"width:5px;\" \\>" // Stream closing button column
s << "<th>Received</th>"; << "<th class=\"streamdest\">Destination</th>"
s << "<th>Out</th>"; << "<th>Sent</th>"
s << "<th>In</th>"; << "<th>Received</th>"
s << "<th>Buf</th>"; << "<th>Out</th>"
s << "<th>RTT</th>"; << "<th>In</th>"
s << "<th>Window</th>"; << "<th>Buf</th>"
s << "<th>Status</th>"; << "<th>RTT</th>"
s << "</tr>\r\n</thead>\r\n<tbody class=\"tableitem\">\r\n"; << "<th>Window</th>"
<< "<th>Status</th>"
<< "</tr>\r\n</thead>\r\n<tbody class=\"tableitem\">\r\n";
for (const auto& it: dest->GetAllStreams ()) for (const auto& it: dest->GetAllStreams ())
{ {
@ -739,17 +741,25 @@ namespace http {
s << " <button type=\"submit\">" << tr("Change") << "</button>\r\n"; s << " <button type=\"submit\">" << tr("Change") << "</button>\r\n";
s << "</form>\r\n<br>\r\n"; s << "</form>\r\n<br>\r\n";
std::string currLang = i2p::client::context.GetLanguage ()->GetLanguage(); // get current used language // get current used language
s << "<b>" << tr("Change language") << "</b><br>\r\n"; std::string currLang = i2p::client::context.GetLanguage ()->GetLanguage();
s << "<form method=\"get\" action=\"" << webroot << "\">\r\n";
s << " <input type=\"hidden\" name=\"cmd\" value=\"" << HTTP_COMMAND_SETLANGUAGE << "\">\r\n"; s << "<b>"
s << " <input type=\"hidden\" name=\"token\" value=\"" << token << "\">\r\n"; << tr("Change language")
s << " <select name=\"lang\" id=\"lang\">\r\n"; << "</b><br>\r\n"
<< "<form method=\"get\" action=\"" << webroot << "\">\r\n"
<< " <input type=\"hidden\" name=\"cmd\" value=\"" << HTTP_COMMAND_SETLANGUAGE << "\">\r\n"
<< " <input type=\"hidden\" name=\"token\" value=\"" << token << "\">\r\n"
<< " <select name=\"lang\" id=\"lang\">\r\n";
for (const auto& it: i2p::i18n::languages) for (const auto& it: i2p::i18n::languages)
s << " <option value=\"" << it.first << "\"" << ((it.first.compare(currLang) == 0) ? " selected" : "") << ">" << it.second.LocaleName << "</option>\r\n"; s << " <option value=\"" << it.first << "\"" << ((it.first.compare(currLang) == 0) ? " selected" : "") << ">" << it.second.LocaleName << "</option>\r\n";
s << " </select>\r\n";
s << " <button type=\"submit\">" << tr("Change") << "</button>\r\n"; s << " </select>\r\n"
s << "</form>\r\n<br>\r\n"; << " <button type=\"submit\">"
<< tr("Change")
<< "</button>\r\n"
<< "</form>\r\n<br>\r\n";
} }

18
libi2pd_client/HTTPProxy.cpp

@ -313,7 +313,7 @@ namespace proxy {
std::string full_url = m_RequestURL.to_string(); std::string full_url = m_RequestURL.to_string();
std::stringstream ss; std::stringstream ss;
ss << tr("Host") << " " << m_RequestURL.host << " <font color=red>" << tr("already in router's addressbook") << "</font>. "; ss << tr("Host") << " " << m_RequestURL.host << " <font color=red>" << tr("already in router's addressbook") << "</font>. ";
ss << tr("Click here to update record:") << " <a href=\"" << full_url << (full_url.find('?') != std::string::npos ? "&i2paddresshelper=" : "?i2paddresshelper="); ss << tr(/* tr: The "record" means addressbook's record. That message appears when domain was already added to addressbook, but helper link is opened for it. */ "Click here to update record:" ) << " <a href=\"" << full_url << (full_url.find('?') != std::string::npos ? "&i2paddresshelper=" : "?i2paddresshelper=");
ss << jump << "&update=true\">" << tr("Continue") << "</a>."; ss << jump << "&update=true\">" << tr("Continue") << "</a>.";
GenericProxyInfo(tr("Addresshelper found"), ss.str()); GenericProxyInfo(tr("Addresshelper found"), ss.str());
return true; /* request processed */ return true; /* request processed */
@ -422,8 +422,8 @@ namespace proxy {
void HTTPReqHandler::ForwardToUpstreamProxy() void HTTPReqHandler::ForwardToUpstreamProxy()
{ {
LogPrint(eLogDebug, "HTTPProxy: Forwarded to upstream"); LogPrint(eLogDebug, "HTTPProxy: Forwarded to upstream");
// build http request
/* build http request */
m_ClientRequestURL = m_RequestURL; m_ClientRequestURL = m_RequestURL;
LogPrint(eLogDebug, "HTTPProxy: ", m_ClientRequestURL.host); LogPrint(eLogDebug, "HTTPProxy: ", m_ClientRequestURL.host);
m_ClientRequestURL.schema = ""; m_ClientRequestURL.schema = "";
@ -431,17 +431,17 @@ namespace proxy {
std::string origURI = m_ClientRequest.uri; // TODO: what do we need to change uri for? std::string origURI = m_ClientRequest.uri; // TODO: what do we need to change uri for?
m_ClientRequest.uri = m_ClientRequestURL.to_string(); m_ClientRequest.uri = m_ClientRequestURL.to_string();
// update User-Agent to ESR version of Firefox, same as Tor Browser below version 8, for non-HTTPS connections /* update User-Agent to ESR version of Firefox, same as Tor Browser below version 8, for non-HTTPS connections */
if(m_ClientRequest.method != "CONNECT") if(m_ClientRequest.method != "CONNECT")
m_ClientRequest.UpdateHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"); m_ClientRequest.UpdateHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0");
m_ClientRequest.write(m_ClientRequestBuffer); m_ClientRequest.write(m_ClientRequestBuffer);
m_ClientRequestBuffer << m_recv_buf.substr(m_req_len); m_ClientRequestBuffer << m_recv_buf.substr(m_req_len);
// assume http if empty schema /* assume http if empty schema */
if (m_ProxyURL.schema == "" || m_ProxyURL.schema == "http") if (m_ProxyURL.schema == "" || m_ProxyURL.schema == "http")
{ {
// handle upstream http proxy /* handle upstream http proxy */
if (!m_ProxyURL.port) m_ProxyURL.port = 80; if (!m_ProxyURL.port) m_ProxyURL.port = 80;
if (m_ProxyURL.is_i2p()) if (m_ProxyURL.is_i2p())
{ {
@ -449,9 +449,9 @@ namespace proxy {
auto auth = i2p::http::CreateBasicAuthorizationString (m_ProxyURL.user, m_ProxyURL.pass); auto auth = i2p::http::CreateBasicAuthorizationString (m_ProxyURL.user, m_ProxyURL.pass);
if (!auth.empty ()) if (!auth.empty ())
{ {
// remove existing authorization if any /* remove existing authorization if any */
m_ClientRequest.RemoveHeader("Proxy-"); m_ClientRequest.RemoveHeader("Proxy-");
// add own http proxy authorization /* add own http proxy authorization */
m_ClientRequest.AddHeader("Proxy-Authorization", auth); m_ClientRequest.AddHeader("Proxy-Authorization", auth);
} }
m_send_buf = m_ClientRequest.to_string(); m_send_buf = m_ClientRequest.to_string();
@ -470,7 +470,7 @@ namespace proxy {
} }
else if (m_ProxyURL.schema == "socks") else if (m_ProxyURL.schema == "socks")
{ {
// handle upstream socks proxy /* handle upstream socks proxy */
if (!m_ProxyURL.port) m_ProxyURL.port = 9050; // default to tor default if not specified if (!m_ProxyURL.port) m_ProxyURL.port = 9050; // default to tor default if not specified
boost::asio::ip::tcp::resolver::query q(m_ProxyURL.host, std::to_string(m_ProxyURL.port)); boost::asio::ip::tcp::resolver::query q(m_ProxyURL.host, std::to_string(m_ProxyURL.port));
m_proxy_resolver.async_resolve(q, std::bind(&HTTPReqHandler::HandleUpstreamProxyResolved, this, std::placeholders::_1, std::placeholders::_2, [&](boost::asio::ip::tcp::endpoint ep) { m_proxy_resolver.async_resolve(q, std::bind(&HTTPReqHandler::HandleUpstreamProxyResolved, this, std::placeholders::_1, std::placeholders::_2, [&](boost::asio::ip::tcp::endpoint ep) {
@ -479,7 +479,7 @@ namespace proxy {
} }
else else
{ {
// unknown type, complain /* unknown type, complain */
GenericProxyError(tr("unknown outproxy url"), m_ProxyURL.to_string()); GenericProxyError(tr("unknown outproxy url"), m_ProxyURL.to_string());
} }
} }

Loading…
Cancel
Save