mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 17:03:06 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
3f5ea7998f
3 changed files with 12 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
- Updated dependencies (including the library that lacked armhf support) [#722](https://github.com/juanfont/headscale/pull/722)
|
- Updated dependencies (including the library that lacked armhf support) [#722](https://github.com/juanfont/headscale/pull/722)
|
||||||
- Fix missing group expansion in function `excludeCorretlyTaggedNodes` [#563](https://github.com/juanfont/headscale/issues/563)
|
- Fix missing group expansion in function `excludeCorretlyTaggedNodes` [#563](https://github.com/juanfont/headscale/issues/563)
|
||||||
- Improve registration protocol implementation and switch to NodeKey as main identifier [#725](https://github.com/juanfont/headscale/pull/725)
|
- Improve registration protocol implementation and switch to NodeKey as main identifier [#725](https://github.com/juanfont/headscale/pull/725)
|
||||||
|
- Add ability to connect to PostgreSQL via unix socket [#734](https://github.com/juanfont/headscale/pull/734)
|
||||||
|
|
||||||
## 0.16.0 (2022-07-25)
|
## 0.16.0 (2022-07-25)
|
||||||
|
|
||||||
|
|
12
app.go
12
app.go
|
@ -130,14 +130,22 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
|
||||||
case Postgres:
|
case Postgres:
|
||||||
dbString = fmt.Sprintf(
|
dbString = fmt.Sprintf(
|
||||||
"host=%s port=%d dbname=%s user=%s password=%s",
|
"host=%s port=%d dbname=%s user=%s password=%s",
|
||||||
|
"host=%s dbname=%s user=%s",
|
||||||
cfg.DBhost,
|
cfg.DBhost,
|
||||||
cfg.DBport,
|
|
||||||
cfg.DBname,
|
cfg.DBname,
|
||||||
cfg.DBuser,
|
cfg.DBuser,
|
||||||
cfg.DBpass,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if !cfg.DBssl {
|
if !cfg.DBssl {
|
||||||
dbString = dbString + " sslmode=disable"
|
dbString = dbString + " sslmode=disable"
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg.DBport != 0 {
|
||||||
|
dbString += fmt.Sprintf(" port=%d", cfg.DBport)
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg.DBpass != "" {
|
||||||
|
dbString += fmt.Sprintf(" password=%s", cfg.DBpass)
|
||||||
}
|
}
|
||||||
case Sqlite:
|
case Sqlite:
|
||||||
dbString = cfg.DBpath
|
dbString = cfg.DBpath
|
||||||
|
|
|
@ -114,6 +114,7 @@ db_type: sqlite3
|
||||||
db_path: /var/lib/headscale/db.sqlite
|
db_path: /var/lib/headscale/db.sqlite
|
||||||
|
|
||||||
# # Postgres config
|
# # Postgres config
|
||||||
|
# If using a Unix socket to connect to Postgres, set the socket path in the 'host' field and leave 'port' blank.
|
||||||
# db_type: postgres
|
# db_type: postgres
|
||||||
# db_host: localhost
|
# db_host: localhost
|
||||||
# db_port: 5432
|
# db_port: 5432
|
||||||
|
|
Loading…
Reference in a new issue