Changeset 0dbc809
- Timestamp:
- Apr 13, 2019 7:02:35 PM (2 years ago)
- Branches:
- master
- Children:
- 89b38f4f
- Parents:
- 64c7625
- Location:
- apps/i2ptunnel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java
r64c7625 r0dbc809 77 77 private Destination _dest; 78 78 private String _filterDefinition; 79 private int _encryptMode; 79 80 80 81 public TunnelConfig() { … … 259 260 /** @since 0.9.40 */ 260 261 public void setEncryptMode(int mode) { 261 switch (mode) { 262 case 0: 263 default: 264 setEncrypt(false); 265 _otherOptions.remove("i2cp.leaseSetSecret"); 266 break; 267 268 case 1: 269 setEncrypt(true); 270 _otherOptions.remove("i2cp.leaseSetType"); 271 // doesn't work, after this in the form 272 _otherOptions.remove("i2cp.leaseSetSecret"); 273 break; 274 275 case 4: 276 case 6: 277 // TODO 278 // Fallthrough 279 case 2: 280 setEncrypt(false); 281 _otherOptions.put("i2cp.leaseSetType", "5"); 282 // doesn't work, after this in the form 283 _otherOptions.remove("i2cp.leaseSetSecret"); 284 break; 285 286 case 5: 287 case 7: 288 // TODO 289 // Fallthrough 290 case 3: 291 setEncrypt(false); 292 _otherOptions.put("i2cp.leaseSetType", "5"); 293 break; 294 } 262 setEncrypt(mode == 1); 263 _encryptMode = mode; 295 264 } 296 265 … … 676 645 // see TunnelController.setConfig() 677 646 _booleanOptions.add(TunnelController.PROP_LIMITS_SET); 678 for (String p : _booleanServerOpts) 647 for (String p : _booleanServerOpts) { 679 648 config.setProperty(OPT + p, Boolean.toString(_booleanOptions.contains(p))); 649 } 650 680 651 for (String p : _otherServerOpts) { 681 652 if (_otherOptions.containsKey(p)) 682 653 config.setProperty(OPT + p, _otherOptions.get(p)); 654 } 655 656 switch (_encryptMode) { 657 case 0: 658 default: 659 config.remove(OPT + "i2cp.leaseSetSecret"); 660 if ("5".equals(config.get(OPT + "i2cp.leaseSetType"))) 661 config.remove(OPT + "i2cp.leaseSetType"); 662 break; 663 664 case 1: 665 config.remove(OPT + "i2cp.leaseSetType"); 666 config.remove(OPT + "i2cp.leaseSetSecret"); 667 break; 668 669 case 4: 670 case 6: 671 // TODO 672 // Fallthrough 673 case 2: 674 config.put(OPT + "i2cp.leaseSetType", "5"); 675 config.remove(OPT + "i2cp.leaseSetSecret"); 676 break; 677 678 case 5: 679 case 7: 680 // TODO 681 // Fallthrough 682 case 3: 683 config.put(OPT + "i2cp.leaseSetType", "5"); 684 break; 683 685 } 684 686 } -
apps/i2ptunnel/jsp/register.jsp
r64c7625 r0dbc809 79 79 <input type="submit" class="default" name="action" value="Save changes" /> 80 80 <% 81 if (!"new".equals(tunnelType)) { 81 String curEncryptMode = editBean.getEncryptMode(curTunnel); 82 if (!"0".equals(curEncryptMode)) { 83 %> 84 <table><tr><td class="infohelp"> 85 <%=intl._t("This service uses encrypted leasesets. Registration is not recommended. Registration authentication is disabled.")%> 86 </td></tr> 87 <% 88 } else if (!"new".equals(tunnelType)) { 82 89 %> 83 90
Note: See TracChangeset
for help on using the changeset viewer.