gzip-static for website root directory

2022-11-29 Thread Jim Anderson
I have a basic web server set up

server "example.com" {
listen on * port 80
gzip-static

directory {
index index.html
no auto index
}
}

When opening the root webpage (http://example.com), the server does not
respond with "Content-Encoding: gzip" and does not use the gzipped
index file from the directory index (index.html). The gzip encoded
file is returned for sub-directories (http://example.com/mypage/). As a
fix I am using

location match "^/$" {
block return 307 "/index.html"
}

I tried "request rewrite" instead of "block return" but it didn't work.
Is this as intended, or is there a better way to have the gzip
encoded file delivered for the webpage root?



Re: Documentation of wsconsctl keyboard.map format?

2022-11-29 Thread Mike Fischer


> Am 27.11.2022 um 19:48 schrieb Vlad Meșco :
> 
> On Fri, Nov 25, 2022 at 03:32:20AM +0100, Mike Fischer wrote:
>> 
>>> Am 24.11.2022 um 15:07 schrieb u...@disroot.org:
>>> 
>>> Hello!
>>> 
>>> I would like to find some supporting documentation too, if anything is 
>>> available, but for certain other reasons 
>>> (https://github.com/letoram/arcan/issues/263). Basically, this "desktop 
>>> engine" has problems with figuring out my keyboard layouts, and I want to 
>>> figure out why. This might've been more appropriate to post in ports@ but 
>>> this thread catched my eye, so I'm here. It would be nice to be able to 
>>> determine what keycodes correspond to what symbols in console, to figure 
>>> out what goes wrong in the process of how Arcan determines my keyboard 
>>> layout. Any help appreciated!
>> 
>> I’m not sure this will help with your issue but here is what I have been 
>> able to figure out so far:
>> 
>> 
>> One thing that helped me a bit (though I have not solved this issue yet) was 
>> the definition of the keycodes in the USB HID standards. I found this link 
>> where presumably the codes sent by USB keyboards are defined:
>> https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
>> Or see https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf table 
>> 12 on page 53 for something more official.
>> You will still need to figure out which keycodes a specific keyboard will 
>> send for certain keys, as there is some ambiguity with regard to the 
>> labeling of keys, especially for non-us localizations. For example some of 
>> the Apple keyboards have a  modifier key. I don’t see that mentioned in 
>> the USB spec. Maybe the keyboard handles this internally but that is simply 
>> guessing at the moment.
>> 
>> The usable entity names are somewhat defined (you need to chop off the 
>> prefix of the names) in source code:
>> /src/sys/dev/wscons/wsksymdef.h
>> Additionally Vlad Meșco mentioned that arbitrary Unicode values can be 
>> specified using e.g. unknown_50082 (for U+C3A2?) instead of a known entity. 
>> I have not tested this yet.
>> 
>> The actual predefined keyboard maps are compiled into OpenBSD drivers:
>> /src/sys/dev/pckbc/wskbdmap_mfii.c
>> /src/sys/dev/usb/ukbdmap.c (which seems to be derived from wskbdmap_mfii.c)
>> 
>> 
>> Note: All of the OpenBSD source files can be found at: 
>> https://cvsweb.openbsd.org
>> 
>> 
>> That doesn’t explain the syntax of keyboard.map though.
>> 
>> And I have analyzed the de keyboard.encoding somewhat and found it to be 
>> quite different from the way macOS treats German Apple USB keyboards.
>> 
>> ...
>> 
>> But apparently the 4 columns in the keycode entries are:   
>>  
>> Note: On non-Apple keyboards  may be labeled as . Apple 
>> labels both  and  as  and does not generally 
>> differentiate between the two.
>> 
>> Adding the very obscure:
>> wsconsctl keyboard.map+="keycode 226 = Cmd2 Mode_switch Multi_key"
>> (modified from the example Vlad Meșco mentioned to match the  
>> keycode from the USB spec) finally yielded the expected result:
>> <7>: 7 (expected, ok)
>> <7>: / (expected, ok)
>> <7>: | (expected, ok)
>> <7>: \ (expected, ok)
>> <7>: | (expected, ok)
>> <7>: \ (expected, ok)
>> 
>> I can use this but I don’t understand how it works. :-(
>> 
>> ...
>> 
>> More enlightened but still puzzled…
>> Mike
>> 


Hi Vlad,

thanks and sorry for the late reply. I was dealing with other things and 
getting the Apple keyboard working like I expect is more of a hobby project…


> Hey Mike,
> 
> You can look at /usr/src/sbin/wsconsctl/map.parse.y

Good idea! I’ll take a look.

One thing I did notice was that the keysym examples I saw in the (sparse) 
documentation did not work. For example:
# wsconsctl keyboard.map+="keysym Alt_L = Alt_R"
wsconsctl: keysym Alt_L not found
# 
Actually none of the keyboard.map versions I have seen so far use keysym.


> As mentioned earlier, the keysyms and commands and groups are listed in
> /usr/src/sys/dev/wscons/wsksymdef.h . Around line 485 you get into
> modifiers, function keys, and command keys.

I saw that. Most of the modifier keys are self-explanatory. However I have no 
idea what
#define KS_Multi_key0xf109
#define KS_Mode_switch  0xf10a
mean? And they are used in the keyboard maps for the definitions of the Alt 
keys:
keycode 230 = Cmd2 Mode_switch Multi_key
And my patch/setting to make the left Alt key behave the same as the right one:
keycode 226 = Cmd2 Mode_switch Multi_key

Also the semantics of these is unclear to me:
#define KS_Cmd  0xf10d
#define KS_Cmd1 0xf10e
#define KS_Cmd2 0xf10f


> For educational purposes, you can go check /usr/src/sbin/wsconsctl,
> where e.g. util.c lists keyboard types. Another place is
> /usr/include/dev/wscons/wsconsio.h which also lists what tokens
> wsconsctl likes. The wscons driver is in /usr/src/sys/dev/wscons (also,
> man 8 wskbd), and keyboard drivers are also thereabout

Re: *BSD and MariaDB server

2022-11-29 Thread Bodie




On 29.11.2022 16:35, Gustavo Rios wrote:

Hi folks!

I would like to know what would it be the best bsd (net/free/open) 
server

to run a MariaDB server ?

i mean in terms of performance.

Thanks a lot.


Wrong question as it depends on your usage.

At least OBSD has more newer version of that DB then other BSDs and 
bigger

user base then eg. NetBSD so in theory bigger chance for some support.

Your best bet if you have time is to install each combo and test your 
load.

That way you can avoid future surprises when in real use.



*BSD and MariaDB server

2022-11-29 Thread Gustavo Rios
Hi folks!

I would like to know what would it be the best bsd (net/free/open) server
to run a MariaDB server ?

i mean in terms of performance.

Thanks a lot.

-- 
The lion and the tiger may be more powerful, but the wolves do not perform
in the circus


Re: obfs4proxy-0.0.14 in packages for 7.2 (amd64)?

2022-11-29 Thread Raimo Niskanen
On Tue, Nov 29, 2022 at 12:11:08PM +, Stuart Henderson wrote:
> On 2022-11-29, Raimo Niskanen  wrote:
> > On Tue, Nov 22, 2022 at 08:31:30AM +, Stuart Henderson wrote:
> >> On 2022-11-22, Raimo Niskanen  wrote:
> >> > Hello
> >> >
> >> > I note the updated package in snapshots/packages, and wonder
> >> > if the "fixes of important obfusction bugs" that are in
> >> > obfs4proxy 0.0.14 will also appear in 7.2/packages?
> >> 
> >> I've just applied it to -stable so it should show up soon.
> >> 
> >
> > How soonish?
> 
> Nov 22nd.
> 
> > https://ftp.lysator.liu.se/pub/OpenBSD/7.2/packages/amd64/
> > still shows obfs4proxy-0.0.13p0.tgz; is that a right place
> > to see the updated package?
> 
> 7.2/packages-stable/amd64 (if you just set "PKG_PATH=ftp.lysator.liu.se"
> it should pick that up automatically).

Right!  packages-stable - thank you for the cluestick!

Cheers!
-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Re: obfs4proxy-0.0.14 in packages for 7.2 (amd64)?

2022-11-29 Thread Stuart Henderson
On 2022-11-29, Raimo Niskanen  wrote:
> On Tue, Nov 22, 2022 at 08:31:30AM +, Stuart Henderson wrote:
>> On 2022-11-22, Raimo Niskanen  wrote:
>> > Hello
>> >
>> > I note the updated package in snapshots/packages, and wonder
>> > if the "fixes of important obfusction bugs" that are in
>> > obfs4proxy 0.0.14 will also appear in 7.2/packages?
>> 
>> I've just applied it to -stable so it should show up soon.
>> 
>
> How soonish?

Nov 22nd.

> https://ftp.lysator.liu.se/pub/OpenBSD/7.2/packages/amd64/
> still shows obfs4proxy-0.0.13p0.tgz; is that a right place
> to see the updated package?

7.2/packages-stable/amd64 (if you just set "PKG_PATH=ftp.lysator.liu.se"
it should pick that up automatically).




Re: obfs4proxy-0.0.14 in packages for 7.2 (amd64)?

2022-11-29 Thread Pascal Stumpf
On Tue, 29 Nov 2022 12:31:23 +0100, Raimo Niskanen wrote:
> On Tue, Nov 22, 2022 at 08:31:30AM +, Stuart Henderson wrote:
> > On 2022-11-22, Raimo Niskanen  wrote:
> > > Hello
> > >
> > > I note the updated package in snapshots/packages, and wonder
> > > if the "fixes of important obfusction bugs" that are in
> > > obfs4proxy 0.0.14 will also appear in 7.2/packages?
> > 
> > I've just applied it to -stable so it should show up soon.
> > 
> 
> How soonish?
> 
> https://ftp.lysator.liu.se/pub/OpenBSD/7.2/packages/amd64/
> still shows obfs4proxy-0.0.13p0.tgz; is that a right place
> to see the updated package?

No.  Look in 7.2/packages-stable/amd64.


> > -- 
> > Please keep replies on the mailing list.
> 
> Best regards
> -- 
> 
> / Raimo Niskanen, Erlang/OTP, Ericsson AB
> 



Re: obfs4proxy-0.0.14 in packages for 7.2 (amd64)?

2022-11-29 Thread Raimo Niskanen
On Tue, Nov 22, 2022 at 08:31:30AM +, Stuart Henderson wrote:
> On 2022-11-22, Raimo Niskanen  wrote:
> > Hello
> >
> > I note the updated package in snapshots/packages, and wonder
> > if the "fixes of important obfusction bugs" that are in
> > obfs4proxy 0.0.14 will also appear in 7.2/packages?
> 
> I've just applied it to -stable so it should show up soon.
> 

How soonish?

https://ftp.lysator.liu.se/pub/OpenBSD/7.2/packages/amd64/
still shows obfs4proxy-0.0.13p0.tgz; is that a right place
to see the updated package?

> -- 
> Please keep replies on the mailing list.

Best regards
-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB