IRCaBot 2.1.0
GPLv3 © acetone, 2021-2022
#i2p-dev
/2024/09/23
@eyedeekay
&eche|on
&kytv
&zzz
+R4SAS
+RN
+RN_
+T3s|4
+acetone
+dr|z3d
+hk
+orignal
+postman
+weko
+wodencafe
An0nm0n
Arch
Danny
DeltaOreo
FreefallHeavens
Irc2PGuest21357
Irc2PGuest21881
Irc2PGuest89954
Leopold_
Nausicaa
Onn4l7h
Onn4|7h
Over1
Sisyphus
Sleepy
Soni
T3s|4_
aargh2
anon2
b3t4f4c3
bak83
boonst
cancername
cumlord
dr4wd3
eyedeekay_bnc
hagen_
khb
not_bob_afk
plap
poriori
profetikla
r3med1tz-
rapidash
shiver_
solidx66
tr
u5657
uop23ip
w8rabbit
x74a6
orignal zzz, is there a reason why User-Agent in HTTP proxy is not configurable?
orignal people are asking
eyedeekay orignal it is configurable:
eyedeekay httpclient.userAgent.i2p
eyedeekay httpclient.userAgent.outproxy
eyedeekay and: i2ptunnel.httpclient.sendUserAgent=true will just pass through the existing user-agent
orignal thanks
orignal I meant for HTTP proxy only
orignal httpclient is HTTP Proxy. right?
dr|z3d two separate user agents, in-network and outproxy.
dr|z3d however, the outproxy useragent is mostly useless given everything happens over https/
goose2_ Can RAW Datagrams and Repliable Datagrams be explicitly distinguished, and can each have independent listeners simultaneously?
orignal I need for HTTP proxy only
dr|z3d internal you mean?
dr|z3d and where exactly do you need it?
orignal when someone connects to eepsite
dr|z3d right, so internal. and that's in i2pd?
orignal I always send MYOB now
dr|z3d so why are you asking us if it's configurable?
dr|z3d it's configurable if you make it configurable.
orignal I thought it was not configurable
orignal it's clear now
dr|z3d well, evidently it's not configurable in i2pd. :)
orignal no it's not
orignal and it was not configurable when I started i2pd
dr|z3d you can send whatever useragent you like, but bear in mind that some sites may reject your requests if you're not using the default.
orignal it's not my business
dr|z3d if you're implementing an option, it is your business to know.
orignal it will be false by defult
dr|z3d it's not a boolean value, it's a string.
orignal <eyedeekay> and: i2ptunnel.httpclient.sendUserAgent=true will just pass through the existing user-agent
dr|z3d that's a slightly different option.
orignal I need this one
dr|z3d if you want to set a custom UA, that's a string. or you can use a passthrough as eyedeekay mentioned.
orignal user wants to specify one as curl's param
dr|z3d alternatively, if you use a standard tunnel instead of an http tunnel, your client's useragent will be exposed.
orignal they also need addresshelper
dr|z3d ok, well that file I linked has all the info you need.
orignal thanks. looked at the code
dr|z3d *thumbs up*
orignal what is DNSOverHTTPS.UA_CLEARNET?
orignal should implement the same
orignal for outproxy
dr|z3d that's synced with the Tor browser UA.
orignal but what's the current value?
dr|z3d public static final String UA_CLEARNET = "Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0";
orignal thanks
orignal but where do you take it from?
dr|z3d > that's synced with the Tor browser UA.
orignal how? manually?
dr|z3d yes, manually. it doesn't change that often.
orignal thanks. will do the same
dr|z3d remember that it's mostly useless because https.
orignal it depends
orignal some sites are still http
dr|z3d that's the "mostly" part of my assertion.
orignal implemented
dr|z3d chocolate start for orignal.
dr|z3d *star
zzz eyedeekay, you didn't ask me to review your console MR, but since you've merged it I have questions
eyedeekay Ask away^
zzz I'm hung up on the myLeaseSet variable
zzz what is it and why
zzz lines 701-703 is bizarre; then you check if it's null at line 836 but it can't be
dr|z3d I'm doing a parallel rejig of LS display fwiw. it's a bit of a nuisance.
zzz is it literally intended to be "my" leaseset? because it's not
eyedeekay Prior to the change the subDb's display didn't distinguish between the local leaseSet belonging to the client that owned the subDb and the other leaseSets in the subDb, myLeaseSet is always the leaseSet that belongs to the client that owns the subDb and is always at the top of the display
eyedeekay I keep track of it in myLeaseSet so that I can reference it there and so that I can exclude the local leaseSet from the list of remote leaseSets below it
dr|z3d I got a question for you, eyedeekay. Is there any way to assocate all subDb leasesets by nickname / hostname?
zzz but at line 701-703 you're grabbing the first one and calling it "my" leaseset, why is that it?
dr|z3d and, just as importantly, display that host/nick.
zzz and you're calling netdb.getLeases() 3 times when you already have all of them in 'leases'
zzz not following the logic at all
zzz and why all this work at the last minute for something hidden behind advanced config
eyedeekay That's arguably a dirty trick, but the reason is that the local client won't get any leaseSets until it has it's local leaseSet
zzz yes but its not guaranteed to be the first one
zzz 'myLeaseSet' referenced 15 times and every one is a headscratcher to me
zzz I haven't tested but I don't understand the diff
zzz you're trying to list your own LS first and then not again? I don't think this code does that, but haven't tested
eyedeekay Well the diff is about making visual distinctions between the subDb's and the leaseSets they contain clearer by improving the labeling of subDbs and distinguishing between remote and local leaseSets in those subDbs
zzz LeaseSet myLeaseSet = new LeaseSet();
zzz if (netdb.getLeases().size() > 0)
zzz myLeaseSet = new ArrayList<LeaseSet>(netdb.getLeases()).get(0);
zzz you're (extremely inefficiently) grabbing a random LS and calling it "my"
zzz and it's also racy
dr|z3d one alternative approach is to modify the LS comparator to order the leasesets as you'd like them.
zzz and you're calling getLeases() a FOURTH time further down
zzz How well did you test it? If this code does what you claim, I'll eat my hat ))
eyedeekay I've got it open right now, I'll post a screenshot
eyedeekay Screenshot's on the way up
dr|z3d what flavor hat are you wearing, zzz.. just curious? :)
zzz you've also copied/lifted 60 lines of code from renderLeaseSet() back up into renderLeaseSetHTML(), why? why not just call renderLeaseSet(myLeaseSet) ?
zzz line 836: if (myLeaseSet == null || ls.getHash() != myLeaseSet.getHash()) {
zzz not only can myLeaseSet not be null, you can't use != here, you must use ! hash1.equals(hash2); break yourself of that habit because it injects really insidious bugs
eyedeekay Ack, that equals vs == thing is pernicious for me I'll work on it
eyedeekay And it's easy enough to replace the getLeases with leases
eyedeekay re: copypasta vs just calling render, there was a good reason when I did it but I need a moment to remember what that reason was
zzz tl;dr it appears you've injected several last-minute bugs here; while not the end of the world because it's all hidden behind configadvanced, I wish you'd asked me to look at it
eyedeekay And just to make sure I'm writing everything down correctly here I need to get myLeaseSet by looking up the client and not by looking at the first entry in the subDb lease table
eyedeekay and deal with the remaining raciness, which if just to be clear you're referring to what happens when you visit /netdb=7 before the subDbs are populated?
dr|z3d needs some work, I'm still working on what's actually needed, but this is where I'm at: cake.i2p/view/CrGo5bkK5v_ePcXcCg9cPvL27kHe6hrYgujh0ZiIA_885WgBuq5g/LeaseSetComparator
zzz netdb.getLeases() must only be called once, both because it's inefficient, and because additional calls could return different results which is racy. You added THREE more calls
eyedeekay Oh yikes yeah I didn't think about the different calls returning different results, OK thanks for pointing that out
zzz correct, the first entry is not guaranteed to be "my", it's a random order, which is why I've bet my hat
zzz you've also not accounted for the fact that there could be TWO "my" leasesets (subsessions)
zzz this was instigated by a dr|z3d request a week ago? just feels like low priority and bad timing. Ideas are great but let's keep overall goals and schedules in mind
dr|z3d oh here we go...
dr|z3d I never made a request, to get the record straight. I had a brief discussion with eyedeekay about the confusing presentation of LeaseSets. I may have mentioned that I was doing some work on it myself. Pretty sure there was no request as such.
zzz that's fine, ideas and/or requests are great
zzz and I agree the tab could be improved
dr|z3d with that said, I'm glad you had a chance to take a look at eyedeekay's commit, he invited me to have a look, and tbh, I couldn't make much sense out of it, which is likely just as much about my shortcoming as anything else.
zzz but anything behind configadvanced, including my search refactor from a week or two ago, is low priority by definition
dr|z3d I anticipated if he did decide to take a look, it wouldn't just be for advanced mode display, which by definition is (usually) confusing to the casual observer.
dr|z3d speaking of your refactor, you've still got 2 pagination methods post-commit. I've condensed them into 1.
zzz yeah, thx, I intentionally left that out just to keep it simple, on my list
zzz tedious explanation of the race:
zzz if (netdb.getLeases().size() > 0)
zzz // netdb goes empty here
zzz myLeaseSet = new ArrayList<LeaseSet>(netdb.getLeases()).get(0);
zzz // AIOOBE (aka TOCTOU bug)
dr|z3d I'm still trying to get my ahead around the difference between local and client leases.
dr|z3d are our published leasesets local and client by definition? it's not clear to me where the overlap and differences are.
eyedeekay Yes they are, in the context I'm referring to them "client" means "belonging to a client application"
eyedeekay they could be published or unpublished
dr|z3d yup, published/unpublished I'm clear on. local/client is still a bit vague.
eyedeekay "local" created locally, we own the private keys, client "belonging to a client application"
dr|z3d if I request a LS and have it locally, it's presumably local because I have it locally, but not necessarily a client LS, right?
dr|z3d ok, so if I request a LS, it's *not* local.
dr|z3d so you're saying that LOCAL leasesets are created by us _locally_, be then published or unpublished. do they then by definition have an associated client?
dr|z3d *be they
dr|z3d I'm asking because if local and client are interchangeable terms, we could/should probably streamline them and pick one.
dr|z3d also, while I remember, website docs, how/network-databse ..
dr|z3d 8 instances of recieved need fixing -> received
eyedeekay I don't think there's a scenario where a local leaseset isn't attached to a client anymore, but some could have more than one, where the client leaseSet is the one with the primary hash, because the primary hash is used to reference the subDb
eyedeekay Ack received
dr|z3d ok, what you last said didn't make things any clearer for me.
dr|z3d if local == client, then can we just use one.
dr|z3d if local != client, then I don't understand the difference.
dr|z3d that's the other one.. client, local, and subDb.
dr|z3d they're all the same, no?
eyedeekay subDb refers to the database owned by the client referenced by the client leaseSet, not a single leaseSet, so that one seems necessary
eyedeekay Re: local vs. client it only comes into play if a client has more than one leaseSet it manages
dr|z3d ok, so let's say, for example, jetty webserver, managing 2 leasesets, one for http and one for https.
eyedeekay In which case there's a 'primary' which is the client
dr|z3d so the client can potentially mantain multiple subdbs? is that necessary?
dr|z3d the more I think I understand, obviously the less I do :)
eyedeekay No just one subdb per client, referenced by the hash of the primary leaseset for the client
eyedeekay Client subdb lives and dies with the client, so if the client shuts down and the hash changes, new subdb for the new hash, the old one is gone forever
eyedeekay Re: multiple subdbs per client, I don't think so, the goal of subdbs is to make it hard to link clients as opposed to linking subsessions
eyedeekay But that's largely a matter of definitions, if client==identity-in-context then subsessions don't need subdbs
eyedeekay I'm 99% sure that's true
dr|z3d ok, just try to get some clarification on the various terms. so we're agreed local and client are interchangeable?
dr|z3d *trying
dr|z3d and each client will have a single subdb?
dr|z3d published/unpublished is fairly clear, both of those should have a nickname associated, so they're easy to represent in the UI.
dr|z3d remote leasesets with susidns reverse lookups are also fairly clear in the UI.
dr|z3d what's not clear is the other stuff that neither has a nickname or a hostname.
dr|z3d and the add-to-addressbook for remote leasesets *without* a reverse lookup hostname, the more I think about that, the more I think it's a total waste of space in the UI.
eyedeekay I am not sure I agree that client and local are interchangeable 100% of the time, but almost always yes
dr|z3d can you think of an example where a local leaseset isn't also a client leaseset?
dr|z3d (or vice versa)
eyedeekay the one you cited, httptunnel-with-subsessions
dr|z3d but it's still a local/client LS, no? except the client maintains two discrete leasesets?
eyedeekay Client is the one with the hash we use to refer to the subDb, others are just local
eyedeekay I will get a better definition of what constitutes 'Primary' that's bugging me through this whole discussion
dr|z3d this could probably use a diagram. if you can doodle something that makes sense to me, I'll turn it into something we can put up on the site.
dr|z3d but it has to make sense. :)
zzz eyedeekay, w.r.t. tag freeze, did you add any new _t strings or are they all just copypasta
zzz because otherwise we have no new strings
zzz yes, "local" means "ours"
eyedeekay I didn't add any new strings per that criteria zzz, just re-used old ones
zzz ok anything else for tag freeze or can I announce over on transifex?
eyedeekay Go for it
zzz deadline noon utc friday oct 4 ok?
eyedeekay Sounds good to me
dr|z3d commemorative hat for postman, courtesy of zzz (he's not eating it) -> cake.i2p/view/c64wTBiQY8_f9wQks8tuOmZxoJWQZGy5YlA0tENJH_U8SGHblwff/zzzhat.webp
zzz yeah everyone give postman his flowers
T3s|4 pleasantly photogenic :)
dr|z3d you got a date, zzz. or your hat has :)
eyedeekay subdbs diagram, maybe a little overkill for what you wanted but I went into detail: cake.i2p/file/kPs0dIHDYN_GIFKqFX3Vb6FXM0vX74OWdoDvo0fZQ_xNgFP9g4w9/netdbs.png
eyedeekay subdbs diagram, maybe a little overkill for what you wanted but I went into detail: cake.i2p/file/kPs0dIHDYN_GIFKqFX3Vb6FXM0vX74OWdoDvo0fZQ_xNgFP9g4w9/netdbs.png
eyedeekay I shouldn't send messages at the exact moment I disconnect...
RN LOL
RN interesting diagram
dolphinandcat is it about the diagram that you sent twice?
RN yes, dolphinandcat he repeated his message accidentally.