Commit Graph

3006 Commits

Author SHA1 Message Date
zzz
f67b62a3a1 javadoc typo 2022-11-28 07:34:24 -05:00
zzz
b60be22754 Util: Add path length constraint = 0 to selfsigned certs 2022-11-28 07:15:19 -05:00
zzz
dfe36b64a5 Util: Fast check for random nextInt(1) and nextLong(1)
Document differences from Java's random for n=0
Entropy harvester cleanups, we're not going to add a factory as jrandom implied.
2022-11-26 09:36:30 -05:00
zzz
495d91193c i2ptunnel: SOCKS 5 tunnel improvements and torsocks support
- Add support for Tor RESOLVE extension by caching and returning fake IP
- Handle user/pw when not required to support Tor stream isolation
  (not really isolating, just handling the authentication)
- Fix user/pw authentication
- Handle outproxy config changes after start
- Support CONNECT outproxies
- Add config UI for outproxy type
- Enable IPv6 (untested)
- Support outproxy config with :port (untested)
- Various cleanups

Further testing required
2022-11-23 12:03:08 -05:00
zzz
50ee30b133 Router: KeysAndCert compressible padding (Proposal 161, Gitlab MR !66)
Update some KeysAndCert and PKF debug output

ref: http://zzz.i2p/topics/3279

Replaces the 256-byte ElG key in dests with padding.
Make all padding in dests and router identities a repeating random 32-byte pattern.

This will make gzipped dests and router identities be much smaller:
Dests: appx. 320 bytes smaller (82% reduction)
RIs: appx. 288 bytes smaller (74% reduction)

Expected to primarily benefit database store messages and streaming SYNs.
Does not rekey or affect existing destinations or router identities.
Testers running this patch may be identifiable via transient destinations.
New installs with this patch will be identifiable via router identities.

This also will significantly speed up Destination creation as
we will no longer generate an ElG keypair.

Tested for several months.
2022-11-23 11:49:00 -05:00
zzz
a40adc5465 Crypto: Don't use AccessController in I2PProvider, deprecated as of Java 17
ref:
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/AccessController.html
2022-11-23 09:36:39 -05:00
zzz
5d259efdd8 Console: /configlogging fixes
Add UI for enabling log compression (requires routerconsole.advanced)
Don't save and display override changed message unless overrides changed
Only call ctx.logManager() once in helper/handler
2022-11-23 09:32:08 -05:00
zzz
8d1d9a020f 2.0.0 2022-11-21 13:00:21 -05:00
zzz
0224a0f03b Console: Make NavHelper non-static
add NavService interface
hang off ClientAppManager
i2psnark: register additional instances with NavService
2022-10-19 15:33:53 -04:00
zzz
c1b241ab8f i2ptunnel, eepget: Add support for SHA-256 digest proxy auth (RFC 7616)
Requires re-saving user/pw on proxy side
2022-09-20 08:26:05 -04:00
zzz
49299f3f28 NetDB: Query connected peers for their RI directly
Negative cache router hash when expiring RI
Log tweaks
2022-09-03 11:59:39 -04:00
zzz
3a4bfc9c07 Util: Add option to gzip router logs
Primarily for devs. No UI.
remove shutdown hook ID
2022-08-28 15:07:30 -04:00
zzz
39954032d2 1.9.0 2022-08-22 10:16:29 -04:00
zzz
6d024b49a9 Fix encoding of getopt translations az and es_AR 2022-08-21 06:36:20 -04:00
zzz
f3dd06ad1e Bump build time 2022-08-13 13:32:26 -04:00
zzz
55603782bb New translation: Spanish (Argentina) 2022-08-13 13:31:53 -04:00
zzz
b606c2084b LogManager: Prevent hangs at shutdown on Mac after dock right-click-quit (Gitlab #363) 2022-07-29 12:23:34 -04:00
zzz
9489b41cb7 Util: Fix UnmodifiableSortedSet compiler warnings 2022-07-05 12:02:28 -04:00
zzz
a6536ea48a Crypto: Fix equality checking of ECParameterSpecs for private keys too
see earlier checkin for public keys
2022-06-21 09:43:16 -04:00
zzz
2bf7d5ddea Util: New UnmodifiableSortedSet based on ArraySet
use in OrderedProperties
2022-06-17 13:07:22 -04:00
zzz
ed1e705d35 Crypto: Fix equality checking of ECParameterSpecs
in SigUtil.fromJavaKey()
as the class does not define equals().
Affects Android family key loading where the class does not match our class.
Tested via unit test to compare provider class sun.security.util.NamedCurve
to our class java.security.spec.ECParameterSpec, untested on Android.
Add conversion test to CertUtil loadcert CLI.
ref: http://zzz.i2p/topics/3328
ref: i2p.android.base gitlab ticket #47
2022-06-17 10:34:34 -04:00
zzz
fa145ff7c5 Util: ArraySet improvements
Was never used; prep for actual usage
Move from router to core
Add Set constructors that are more efficient
Add addUnique() method
Allow size of set passed in constructors
Prepare for extension
javadocs
2022-06-17 10:21:15 -04:00
zzz
a2ec81eaec Util: Cache new SSU2 properties 2022-06-06 16:21:44 -04:00
zzz
3acc4b754a SSLEepGet: Send Host header to HTTPS proxy
ref: RFC 2617 sec. 5.2
2022-05-30 10:39:38 -04:00
zzz
c9a6950550 Crypto: Handle conversion from Java JCA 15+ EdEC keys
Change from unchecked to checked exception on unknown keys
2022-05-28 15:14:29 -04:00
zzz
7ea3c430aa Util: FileLogWriter minor optimization 2022-05-28 12:32:39 -04:00
zzz
d467dc28b9 I2CP: Only send one notification to each session listener
for reportAbuse(), disconnected(), and errorOccurred(),
because a single listener may be registered for multiple ports/protocols
2022-05-28 12:02:52 -04:00
zzz
0826b1e228 Crypto: Throw checked exception
for unimplemented ElG import, so CertUtil.loadPrivateKey() will
continue processing and then
fail with the correct exception and error message on bad input.
Pull constant KeySpec out of loop.
2022-05-25 09:12:12 -04:00
zzz
8256f61d56 1.8.0 / 0.9.54 2022-05-23 09:25:37 -04:00
zzz
5f4ad87d10 Bump build time 2022-05-19 13:13:16 -04:00
zzz
07dbab9f02 Util: Rename modified apache classes (Gitlab ticket #353)
to avoid conflict in applications linking to apache jars
As requested by 'mesh' project
Remove with-libhttpclient-java build option
No known external uses other than obsolete i2pcontrol plugin
2022-05-11 07:54:56 -04:00
zzz
cf7efcada8 I2CP: Soft restart fixes part 3
Remove low-level I2CP reconnector
as it may result in duplicate destinations after
higher-level (i2ptunnel) or application-layer reconnections
Root cause identified by BiglyBT
Gitlab issue #350
2022-04-17 09:45:40 -04:00
zzz
f7c3e06db5 I2CP: Fix external I2CP broken when session ID is 0
one chance in 64K, broken since 2005
don't revert previous attempted fix using synching,
that's still a good idea
2022-04-11 10:30:29 -04:00
zzz
5d22a2152a Data: Add cached X25519/Ed25519 key cert, now common 2022-03-28 08:30:36 -04:00
zzz
acbf849b44 Crypto: Micro-optimize AES encrypt loop 2022-03-28 08:08:22 -04:00
zzz
93493a6d15 Crypto: Add provider in CertUtil so we can load EdDSA certs
Check cert sigs when loading, and log warning on failure
2022-03-27 08:00:08 -04:00
zzz
03e5c6c13c Crypto: Add official EdDSA OIDs to provider 2022-03-26 13:05:28 -04:00
zzz
631a6dd2b2 I2CP: Synch fixes
Synch fields in the data messages both directions,
after one report of zero session ID in MessagePayloadMessage
to an external client on fast hardware with Java 18.
Add new constructors for efficiency.
Deprecated setters, unit tests not changed, TODO.
Should fix all the other messages also, TODO.
2022-03-23 07:25:01 -04:00
zzz
458e980e2f bump -10, javadoc typo 2022-03-20 07:59:32 -04:00
zzz
de27cb1a46 Util: Increase min log file size limit
Rotate the log before we hit the limit, not after
2022-03-16 07:22:00 -04:00
zzz
5ef93f11a9 Util: Add Addresses.getConnectedAddressTypes()
method to efficiently get all types in one pass
2022-03-01 07:25:49 -05:00
zzz
ce53714ba1 Util: Add AddressType enum 2022-03-01 05:48:20 -05:00
zzz
265f5ee5df Util, i2ptunnel: Update firefox user-agent 2022-02-23 07:08:34 -05:00
zzz
63f3d88f78 Util: Speed up PRNG nextInt() and nextLong()
Add signedNextInt()
2022-02-22 09:57:35 -05:00
zzz
9f7f1bbcab Crypto: Prep for SSU2
- ChaCha20: Add ivOffset param
- ChaCha20/Poly1305: Add adOffset/adLength params
- Noise: Add XK-SSU2 initializer
- Noise: Add notes about handshake offsets
2022-02-22 09:45:22 -05:00
zzz
3b9c26fe8a 1.7.0 2022-02-21 09:12:59 -05:00
zzz
309e306337 javadoc fixes 2022-02-10 09:02:39 -05:00
zzz
2ba56a5e17 Bump build time 2022-02-10 08:39:46 -05:00
zzz
c949ad5205 Update Manager: Add an UpdateType for the API version 2022-02-10 08:37:52 -05:00
idk
73e34b3941 Adds the ability to use $OS and $ARCH variables in clients.config and plugins.config(updateURL.* only) 2022-02-02 18:57:30 +00:00