fix clean command and fix formatting for doc pages
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
@@ -30,6 +30,7 @@ lint:
|
|||||||
clang-tidy --warnings-as-errors --config= $(CSRCS) $(HSRCS)
|
clang-tidy --warnings-as-errors --config= $(CSRCS) $(HSRCS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
rm -f *.elf
|
||||||
rm -rf $(DISTDIR)
|
rm -rf $(DISTDIR)
|
||||||
|
|
||||||
run:
|
run:
|
||||||
|
@@ -1,52 +1,64 @@
|
|||||||
My website's API, stores information about my self-hosted services, it also allows me
|
My website's API, stores information about my self-hosted services, it also
|
||||||
to publish news and updates about these services using an Atom feed and it keeps track
|
allows me to publish news and updates about these services using an Atom feed
|
||||||
of visitor metrics.
|
and it keeps track of visitor metrics.
|
||||||
|
|
||||||
This documentation contains information about all the available API endpoints. All the
|
This documentation contains information about all the available API endpoints.
|
||||||
endpoints can be accessed using the `/api` route.
|
All the endpoints can be accessed using the `/api` route.
|
||||||
|
|
||||||
## Version 1 Endpoints
|
## Version 1 Endpoints
|
||||||
|
|
||||||
Each version 1 endpoint, can be accessed using the `/v1` route.
|
Each version 1 endpoint, can be accessed using the `/v1` route.
|
||||||
|
|
||||||
All the endpoints return JSON formatted data.
|
All the endpoints return JSON formatted data.
|
||||||
|
|
||||||
### Errors
|
### Errors
|
||||||
If any error occurs, you will get a non-200 response. And the JSON data will have an
|
|
||||||
`error` key, which will contain information about the error that occured, in the
|
If any error occurs, you will get a non-200 response. And the JSON data will
|
||||||
string format. This is the only JSON key that will be set in non-200 responses.
|
have an `error` key, which will contain information about the error that
|
||||||
|
occured, in the string format. This is the only JSON key that will be set in
|
||||||
|
non-200 responses.
|
||||||
|
|
||||||
### Results
|
### Results
|
||||||
If no error occurs, `error` key will be set to an emtpy string (""). If the endpoint
|
|
||||||
returns any data, this will be stored using the `result` key. The `result` have a
|
If no error occurs, `error` key will be set to an emtpy string (""). If the
|
||||||
different expected type and a format for each endpoint.
|
endpoint returns any data, this will be stored using the `result` key. The
|
||||||
|
`result` have a different expected type and a format for each endpoint.
|
||||||
|
|
||||||
### Multilang
|
### Multilang
|
||||||
Some `result` formats may use a structure called "Multilang". This is a simple JSON
|
|
||||||
structure that includes one key for each supported language. The key is named after
|
Some `result` formats may use a structure called "Multilang". This is a simple
|
||||||
the language it represents. Currently only supported languages are:
|
JSON structure that includes one key for each supported language. The key is
|
||||||
|
named after the language it represents. Currently only supported languages are:
|
||||||
|
|
||||||
- English (`en`)
|
- English (`en`)
|
||||||
- Turkish (`tr`)
|
- Turkish (`tr`)
|
||||||
|
|
||||||
So each multilang structure, will have **at least** one of these keys.
|
So each multilang structure, will have **at least** one of these keys.
|
||||||
|
|
||||||
Here is an example multilang structure:
|
Here is an example multilang structure:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"en": "Hello, world!",
|
"en": "Hello, world!",
|
||||||
"tr": "Merhaba, dünya!"
|
"tr": "Merhaba, dünya!"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
If a `result` field is using a multilang structure, it will be specified as "Multilang"
|
|
||||||
in the rest of the documentation.
|
If a `result` field is using a multilang structure, it will be specified as
|
||||||
|
"Multilang" in the rest of the documentation.
|
||||||
|
|
||||||
### Administrator routes
|
### Administrator routes
|
||||||
The endpoints under the `/v1/admin` route, are administrator-only routes. To access
|
|
||||||
these routes you'll need to specfiy a password using the `Authorization` header. If
|
The endpoints under the `/v1/admin` route, are administrator-only routes. To
|
||||||
the password you specify, matches with the password specified using the `API_PASSWORD`
|
access these routes you'll need to specfiy a password using the `Authorization`
|
||||||
environment variable, you will be able to access the route.
|
header. If the password you specify, matches with the password specified using
|
||||||
|
the `API_PASSWORD` environment variable, you will be able to access the route.
|
||||||
|
|
||||||
### GET /v1/services
|
### GET /v1/services
|
||||||
Returns a list of available services. Each service has the following JSON format:
|
|
||||||
|
Returns a list of available services. Each service has the following JSON
|
||||||
|
format:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"name": "Test Service",
|
"name": "Test Service",
|
||||||
@@ -62,73 +74,91 @@ Returns a list of available services. Each service has the following JSON format
|
|||||||
"i2p": ""
|
"i2p": ""
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
- `name`: Service name (string)
|
- `name`: Service name (string)
|
||||||
- `desc`: Service description (Multilang)
|
- `desc`: Service description (Multilang)
|
||||||
- `check_time`: Last time status check time for the service, set 0 if status checking is
|
- `check_time`: Last time status check time for the service, set 0 if status
|
||||||
not supported for this service/status checking is disabled (integer, UNIX timestamp)
|
checking is not supported for this service/status checking is disabled
|
||||||
|
(integer, UNIX timestamp)
|
||||||
- `check_res`: Last service status check result (integer)
|
- `check_res`: Last service status check result (integer)
|
||||||
* 0 if the service is down
|
- 0 if the service is down
|
||||||
* 1 if the service is up
|
- 1 if the service is up
|
||||||
* 2 if the service is up, but slow
|
- 2 if the service is up, but slow
|
||||||
* 3 if the service doesn't support status checking/status checking is disabled
|
- 3 if the service doesn't support status checking/status checking is disabled
|
||||||
- `check_url`: URL used for service's status check (string, empty if none)
|
- `check_url`: URL used for service's status check (string, empty if none)
|
||||||
- `clear`: Clearnet URL for the service (string, empty string if none)
|
- `clear`: Clearnet URL for the service (string, empty string if none)
|
||||||
- `onion`: Onion (TOR) URL for the service (string, empty string if none)
|
- `onion`: Onion (TOR) URL for the service (string, empty string if none)
|
||||||
- `i2p`: I2P URL for the service (string, empty string if none)
|
- `i2p`: I2P URL for the service (string, empty string if none)
|
||||||
|
|
||||||
You can also get information about a specific service by specifying it's name using
|
You can also get information about a specific service by specifying it's name
|
||||||
a URL query named `name`.
|
using a URL query named `name`.
|
||||||
|
|
||||||
### GET /v1/news/:language
|
### GET /v1/news/:language
|
||||||
Returns a Atom feed of news for the given language. Supports languages that are supported
|
|
||||||
by Multilang.
|
Returns a Atom feed of news for the given language. Supports languages that are
|
||||||
|
supported by Multilang.
|
||||||
|
|
||||||
### GET /v1/metrics
|
### GET /v1/metrics
|
||||||
|
|
||||||
Returns metrics about the API usage. The metric data has the following format:
|
Returns metrics about the API usage. The metric data has the following format:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"since":1736294400,
|
"since": 1736294400,
|
||||||
"total":8
|
"total": 8
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
- `since`: Metric collection start date (integer, UNIX timestamp)
|
- `since`: Metric collection start date (integer, UNIX timestamp)
|
||||||
- `total`: Total number of visitors (integer)
|
- `total`: Total number of visitors (integer)
|
||||||
|
|
||||||
### GET /v1/admin/logs
|
### GET /v1/admin/logs
|
||||||
|
|
||||||
Returns a list of administrator logs. Each log has the following JSON format:
|
Returns a list of administrator logs. Each log has the following JSON format:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"action": "Added service \"Test Service\"",
|
"action": "Added service \"Test Service\"",
|
||||||
"time": 1735861794
|
"time": 1735861794
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
- `action`: Action that the administrator performed (string)
|
- `action`: Action that the administrator performed (string)
|
||||||
- `time`: Time when the administrator action was performed (integer, UNIX timestamp)
|
- `time`: Time when the administrator action was performed (integer, UNIX
|
||||||
|
timestamp)
|
||||||
|
|
||||||
### PUT /v1/admin/service/add
|
### PUT /v1/admin/service/add
|
||||||
Creates a new service. The request body needs to contain JSON data, and it needs to
|
|
||||||
have the JSON format used to represent a service. See `/v1/services/all` route to
|
Creates a new service. The request body needs to contain JSON data, and it needs
|
||||||
see this format.
|
to have the JSON format used to represent a service. See `/v1/services/all`
|
||||||
|
route to see this format.
|
||||||
|
|
||||||
Returns no data on success.
|
Returns no data on success.
|
||||||
|
|
||||||
### DELETE /v1/admin/service/del
|
### DELETE /v1/admin/service/del
|
||||||
Deletes a service. The client needs to specify the name of the service to delete, by
|
|
||||||
setting the URL query `name`.
|
Deletes a service. The client needs to specify the name of the service to
|
||||||
|
delete, by setting the URL query `name`.
|
||||||
|
|
||||||
Returns no data on success.
|
Returns no data on success.
|
||||||
|
|
||||||
### GET /v1/admin/service/check
|
### GET /v1/admin/service/check
|
||||||
|
|
||||||
Forces a status check for all the services.
|
Forces a status check for all the services.
|
||||||
|
|
||||||
Returns no data on success.
|
Returns no data on success.
|
||||||
|
|
||||||
### PUT /v1/admin/news/add
|
### PUT /v1/admin/news/add
|
||||||
|
|
||||||
Creates a news post. The request body needs to contain JSON data, and it needs
|
Creates a news post. The request body needs to contain JSON data, and it needs
|
||||||
to use the following JSON format:
|
to use the following JSON format:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"id": "test_news",
|
"id": "test_news",
|
||||||
@@ -143,7 +173,9 @@ to use the following JSON format:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
- `id`: Unique ID for the news post (string)
|
- `id`: Unique ID for the news post (string)
|
||||||
- `title`: Title for the news post (Multilang)
|
- `title`: Title for the news post (Multilang)
|
||||||
- `author`: Author of the news post (string)
|
- `author`: Author of the news post (string)
|
||||||
@@ -152,7 +184,8 @@ Where:
|
|||||||
Returns no data on success.
|
Returns no data on success.
|
||||||
|
|
||||||
### DELETE /v1/admin/news/del
|
### DELETE /v1/admin/news/del
|
||||||
Deletes a news post. The client needs to specify the ID of the news post to delete,
|
|
||||||
by setting the URL query `id`.
|
Deletes a news post. The client needs to specify the ID of the news post to
|
||||||
|
delete, by setting the URL query `id`.
|
||||||
|
|
||||||
Returns no data on success.
|
Returns no data on success.
|
||||||
|
@@ -1,53 +1,64 @@
|
|||||||
Websitemin API, self-host edilen servisler hakkında bilgileri tutuyor, bu servisler hakkında
|
Websitemin API, self-host edilen servisler hakkında bilgileri tutuyor, bu
|
||||||
haberleri ve güncellemeleri bir Atom feed'i aracılığı ile paylaşmama izin veriyor ve ziyartçi
|
servisler hakkında haberleri ve güncellemeleri bir Atom feed'i aracılığı ile
|
||||||
metriklerini takip ediyor.
|
paylaşmama izin veriyor ve ziyartçi metriklerini takip ediyor.
|
||||||
|
|
||||||
Bu dökümentasyon tüm erişime açık API endpoint'leri hakkında bilgiler içeriyor. Tüm endpoint'lere
|
Bu dökümentasyon tüm erişime açık API endpoint'leri hakkında bilgiler içeriyor.
|
||||||
`/api` yolu ile erişilebilir.
|
Tüm endpoint'lere `/api` yolu ile erişilebilir.
|
||||||
|
|
||||||
## Versyion 1 Endpoint'leri
|
## Versyion 1 Endpoint'leri
|
||||||
|
|
||||||
Tüm versiyon 1 endpoint'leri `/v1` yolu ile erişilebilir.
|
Tüm versiyon 1 endpoint'leri `/v1` yolu ile erişilebilir.
|
||||||
|
|
||||||
Tüm endpoint'ler JSON ile formatlanmış veri döndürür.
|
Tüm endpoint'ler JSON ile formatlanmış veri döndürür.
|
||||||
|
|
||||||
### Hatalar
|
### Hatalar
|
||||||
|
|
||||||
Herhangi bir hata ortaya çıkarsa 200 dışı bir cevap alırsınız. Ve JSON verisinde
|
Herhangi bir hata ortaya çıkarsa 200 dışı bir cevap alırsınız. Ve JSON verisinde
|
||||||
bir `error` girdisi bulunur, bu ortaya çıkan hata hakkında gerekli bilgileri, metin formunda
|
bir `error` girdisi bulunur, bu ortaya çıkan hata hakkında gerekli bilgileri,
|
||||||
içerir. 200 dışı bir cevap aldığınızda tek JSON girdisi bu olacaktır.
|
metin formunda içerir. 200 dışı bir cevap aldığınızda tek JSON girdisi bu
|
||||||
|
olacaktır.
|
||||||
|
|
||||||
### Sonuçlar
|
### Sonuçlar
|
||||||
Eğer bir hata ortaya çıkmaz ise, `error` girdisi boş bir metin olarak ayarlanır ("").
|
|
||||||
Eğer endpoint herhangi bir veri döndürüyorsa, bu veri `result` giridisi ile sağlanır.
|
Eğer bir hata ortaya çıkmaz ise, `error` girdisi boş bir metin olarak ayarlanır
|
||||||
Her endpoint için `result` girdisinin tipi farklı olabilir.
|
(""). Eğer endpoint herhangi bir veri döndürüyorsa, bu veri `result` giridisi
|
||||||
|
ile sağlanır. Her endpoint için `result` girdisinin tipi farklı olabilir.
|
||||||
|
|
||||||
### Multilang
|
### Multilang
|
||||||
Bazı `result` formatları "Multilang" isimli bir yapıyı kullanabilir. Bu her desteklenen
|
|
||||||
dil için bir girdi bulunduran basit bir JSON yapısıdır. Her girdi ifade ettiği dil
|
Bazı `result` formatları "Multilang" isimli bir yapıyı kullanabilir. Bu her
|
||||||
ile isimlendirilir. Şuan tek desteklenen diller:
|
desteklenen dil için bir girdi bulunduran basit bir JSON yapısıdır. Her girdi
|
||||||
|
ifade ettiği dil ile isimlendirilir. Şuan tek desteklenen diller:
|
||||||
|
|
||||||
- English (`en`)
|
- English (`en`)
|
||||||
- Turkish (`tr`)
|
- Turkish (`tr`)
|
||||||
|
|
||||||
Yani her multilang yapısında, bu girdilerden **en az** bir tanesi bulunur.
|
Yani her multilang yapısında, bu girdilerden **en az** bir tanesi bulunur.
|
||||||
|
|
||||||
İşte örnek bir multilang yapısı:
|
İşte örnek bir multilang yapısı:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"en": "Hello, world!",
|
"en": "Hello, world!",
|
||||||
"tr": "Merhaba, dünya!"
|
"tr": "Merhaba, dünya!"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Bu dökümantasyonun geri kalanında, eğer bir `result` girdisi bir multilang yapısı kullanıyorsa,
|
|
||||||
"Multilang" olarak isimlendirilecek.
|
Bu dökümantasyonun geri kalanında, eğer bir `result` girdisi bir multilang
|
||||||
|
yapısı kullanıyorsa, "Multilang" olarak isimlendirilecek.
|
||||||
|
|
||||||
### Yönetici yolları
|
### Yönetici yolları
|
||||||
`/v1/admin` yolu altındaki endpoint'ler yöneticiye-özeldir. Bu yollara erişmek için,
|
|
||||||
`Authorization` header'ı aracılığı ile bir parola belirtmeniz gerekecektir. Eğer
|
`/v1/admin` yolu altındaki endpoint'ler yöneticiye-özeldir. Bu yollara erişmek
|
||||||
belritiğiniz parola `API_PASSWORD` ortam değişkeni ile belirtilen parola ile
|
için, `Authorization` header'ı aracılığı ile bir parola belirtmeniz
|
||||||
uyuşuyorsa, yola erişebilirsiniz.
|
gerekecektir. Eğer belritiğiniz parola `API_PASSWORD` ortam değişkeni ile
|
||||||
|
belirtilen parola ile uyuşuyorsa, yola erişebilirsiniz.
|
||||||
|
|
||||||
### GET /v1/services
|
### GET /v1/services
|
||||||
|
|
||||||
Erişilebilir servislerin bir listesini döndürür. Her servis şu JSON formatını
|
Erişilebilir servislerin bir listesini döndürür. Her servis şu JSON formatını
|
||||||
takip eder:
|
takip eder:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"name": "Test Service",
|
"name": "Test Service",
|
||||||
@@ -63,74 +74,93 @@ takip eder:
|
|||||||
"i2p": ""
|
"i2p": ""
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Burada:
|
Burada:
|
||||||
|
|
||||||
- `name`: Servis ismi (metin)
|
- `name`: Servis ismi (metin)
|
||||||
- `desc`: Servis açıklaması (Multilang)
|
- `desc`: Servis açıklaması (Multilang)
|
||||||
- `check_time`: Servisin en son durumunun kontrol edildiği zaman, eğer bu servis için
|
- `check_time`: Servisin en son durumunun kontrol edildiği zaman, eğer bu servis
|
||||||
durum kontrolü desteklenmiyorsa/durum kontrolü devra dışı bırakılmış ise 0 olarak
|
için durum kontrolü desteklenmiyorsa/durum kontrolü devra dışı bırakılmış ise
|
||||||
ayarlanır (sayı, UNIX zaman damgası)
|
0 olarak ayarlanır (sayı, UNIX zaman damgası)
|
||||||
- `check_res`: En son servis durum kontrolünün sonucu (sayı)
|
- `check_res`: En son servis durum kontrolünün sonucu (sayı)
|
||||||
* servis kapalı ise 0
|
- servis kapalı ise 0
|
||||||
* servis çalışıyor ise 1
|
- servis çalışıyor ise 1
|
||||||
* serivs çalışıyor, ama yavaş ise 2
|
- serivs çalışıyor, ama yavaş ise 2
|
||||||
* bu servis için durum kontrolü desteklenmiyorsa/durum kontrolü devre dışı ise 3
|
- bu servis için durum kontrolü desteklenmiyorsa/durum kontrolü devre dışı ise
|
||||||
- `check_url`: Servis durum kontrolü için kullanılan URL (metin, yoksa boş metin)
|
3
|
||||||
|
- `check_url`: Servis durum kontrolü için kullanılan URL (metin, yoksa boş
|
||||||
|
metin)
|
||||||
- `clear`: Servisin açık ağ URL'si (metin, yoksa boş metin)
|
- `clear`: Servisin açık ağ URL'si (metin, yoksa boş metin)
|
||||||
- `onion`: Servisin Onion (TOR) URL'si (metin, yoksa boş metin)
|
- `onion`: Servisin Onion (TOR) URL'si (metin, yoksa boş metin)
|
||||||
- `i2p`: Servisin I2P URL'si (metin, yoksa boş metin)
|
- `i2p`: Servisin I2P URL'si (metin, yoksa boş metin)
|
||||||
|
|
||||||
`name` isimli bir URL sorgusu ile servisin ismini belirterek, spesifik bir servis hakkında
|
`name` isimli bir URL sorgusu ile servisin ismini belirterek, spesifik bir
|
||||||
bilgi de alabilirsiniz.
|
servis hakkında bilgi de alabilirsiniz.
|
||||||
|
|
||||||
### GET /v1/news/:language
|
### GET /v1/news/:language
|
||||||
Verilen dil için haberlerin bir Atom feed'i döndürür. Multilang tarafından desteklenen
|
|
||||||
dilleri destekler.
|
Verilen dil için haberlerin bir Atom feed'i döndürür. Multilang tarafından
|
||||||
|
desteklenen dilleri destekler.
|
||||||
|
|
||||||
### GET /v1/metrics
|
### GET /v1/metrics
|
||||||
|
|
||||||
API kullanımı hakkınadaki metrikleri döndürür. Metrik şu formatı kullanır:
|
API kullanımı hakkınadaki metrikleri döndürür. Metrik şu formatı kullanır:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"since":1736294400,
|
"since": 1736294400,
|
||||||
"total":8
|
"total": 8
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Burada:
|
Burada:
|
||||||
|
|
||||||
- `since`: Metrik toplama başlangıç tarihi (sayı, UNIX zaman damgası)
|
- `since`: Metrik toplama başlangıç tarihi (sayı, UNIX zaman damgası)
|
||||||
- `total`: Toplam ziyaretçi sayısı (sayı)
|
- `total`: Toplam ziyaretçi sayısı (sayı)
|
||||||
|
|
||||||
### GET /v1/admin/logs
|
### GET /v1/admin/logs
|
||||||
Yönetici kayıtlarının bir listesini döndürür. Her kayıt şu JSON formatını takip eder:
|
|
||||||
|
Yönetici kayıtlarının bir listesini döndürür. Her kayıt şu JSON formatını takip
|
||||||
|
eder:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"action": "Added service \"Test Service\"",
|
"action": "Added service \"Test Service\"",
|
||||||
"time": 1735861794
|
"time": 1735861794
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Burada:
|
Burada:
|
||||||
|
|
||||||
- `action`: Yöneticinin yaptığı eylem (metin)
|
- `action`: Yöneticinin yaptığı eylem (metin)
|
||||||
- `time`: Yönetici eylemin yapıldığı zaman (sayı, UNIX zaman damgası)
|
- `time`: Yönetici eylemin yapıldığı zaman (sayı, UNIX zaman damgası)
|
||||||
|
|
||||||
### PUT /v1/admin/service/add
|
### PUT /v1/admin/service/add
|
||||||
Yeni bir servis oluşturur. İstek gövdesinin servis için kullanılan JSON formatını
|
|
||||||
takip eden JSON verisini içermesi gerekir. Bu formatı görmek için `/v1/services/all`
|
Yeni bir servis oluşturur. İstek gövdesinin servis için kullanılan JSON
|
||||||
yoluna bakınız.
|
formatını takip eden JSON verisini içermesi gerekir. Bu formatı görmek için
|
||||||
|
`/v1/services/all` yoluna bakınız.
|
||||||
|
|
||||||
Başarılı ise herhangi bir veri döndürmez.
|
Başarılı ise herhangi bir veri döndürmez.
|
||||||
|
|
||||||
### DELETE /v1/admin/service/del
|
### DELETE /v1/admin/service/del
|
||||||
Bir servisi siler. İstemcinin `name` URL sorgusu ile silinecek servisin ismini belirtmesi
|
|
||||||
gerekir.
|
Bir servisi siler. İstemcinin `name` URL sorgusu ile silinecek servisin ismini
|
||||||
|
belirtmesi gerekir.
|
||||||
|
|
||||||
Başarılı ise herhangi bir veri döndürmez.
|
Başarılı ise herhangi bir veri döndürmez.
|
||||||
|
|
||||||
### GET /v1/admin/service/check
|
### GET /v1/admin/service/check
|
||||||
|
|
||||||
Tüm servisler için bir durum kontrolünü zorlar.
|
Tüm servisler için bir durum kontrolünü zorlar.
|
||||||
|
|
||||||
Başarılı ise herhangi bir veri döndürmez.
|
Başarılı ise herhangi bir veri döndürmez.
|
||||||
|
|
||||||
### PUT /v1/admin/news/add
|
### PUT /v1/admin/news/add
|
||||||
Yeni bir haber paylaşımı oluşturur. İstek gövedisinin JSOn verisi içermesi ve verilen formatı
|
|
||||||
takip etmesi gerekir:
|
Yeni bir haber paylaşımı oluşturur. İstek gövedisinin JSOn verisi içermesi ve
|
||||||
|
verilen formatı takip etmesi gerekir:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"id": "test_news",
|
"id": "test_news",
|
||||||
@@ -145,7 +175,9 @@ takip etmesi gerekir:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Burada:
|
Burada:
|
||||||
|
|
||||||
- `id`: Haber paylaşımının benzersiz ID'si (metin)
|
- `id`: Haber paylaşımının benzersiz ID'si (metin)
|
||||||
- `title`: Haber paylaşımının başlığı (Multilang)
|
- `title`: Haber paylaşımının başlığı (Multilang)
|
||||||
- `author`: Haber paylaşımının yazarı (metin)
|
- `author`: Haber paylaşımının yazarı (metin)
|
||||||
@@ -154,7 +186,8 @@ Burada:
|
|||||||
Başarılı ise herhangi bir veri döndürmez.
|
Başarılı ise herhangi bir veri döndürmez.
|
||||||
|
|
||||||
### DELETE /v1/admin/news/del
|
### DELETE /v1/admin/news/del
|
||||||
Bir haber paylaşımı siler. İstemcinin `id` URL sorgusu ile silinecek paylaşımın ID'sini
|
|
||||||
belirtmesi gerekir.
|
Bir haber paylaşımı siler. İstemcinin `id` URL sorgusu ile silinecek paylaşımın
|
||||||
|
ID'sini belirtmesi gerekir.
|
||||||
|
|
||||||
Başarılı ise herhangi bir veri döndürmez.
|
Başarılı ise herhangi bir veri döndürmez.
|
||||||
|
@@ -1,31 +1,44 @@
|
|||||||
As a privacy advocate myself I do my best to respect your privacy while simultaneously keeping my server safe. I also think it's
|
As a privacy advocate myself I do my best to respect your privacy while
|
||||||
important to be transparent about this kind of stuff so I wrote this document to tell you how exactly I process or store your
|
simultaneously keeping my server safe. I also think it's important to be
|
||||||
information.
|
transparent about this kind of stuff so I wrote this document to tell you how
|
||||||
|
exactly I process or store your information.
|
||||||
|
|
||||||
## DNS & SSL
|
## DNS & SSL
|
||||||
Currently I use cloudflare's name servers, however cloudflare doesn't own my domain (I didn't purchase the domain from cloudflare)
|
|
||||||
nor it proxies any of the traffic. All of my records use the *DNS only*" mode, meaning they are just DNS records and they point
|
Currently I use cloudflare's name servers, however cloudflare doesn't own my
|
||||||
to my server, not cloudflare. This also means cloudflare doesn't control any of the SSL certificates. All the certificates are
|
domain (I didn't purchase the domain from cloudflare) nor it proxies any of the
|
||||||
stored on my server and they are created with Let's Encrypt. So I own the certificates and it's not possible for cloudlfare to
|
traffic. All of my records use the _DNS only_" mode, meaning they are just DNS
|
||||||
suddenly switch DNS records (it would break SSL).
|
records and they point to my server, not cloudflare. This also means cloudflare
|
||||||
|
doesn't control any of the SSL certificates. All the certificates are stored on
|
||||||
|
my server and they are created with Let's Encrypt. So I own the certificates and
|
||||||
|
it's not possible for cloudlfare to suddenly switch DNS records (it would break
|
||||||
|
SSL).
|
||||||
|
|
||||||
## Usage metrics
|
## Usage metrics
|
||||||
I don't have any kind of request or traffic monitoring on my server. So no, your HTTP(S) requests or other network
|
|
||||||
connections are not processed to generate colorful graphs, pie charts and stuff.
|
|
||||||
|
|
||||||
You may have realized that in the bottom of this page there is total visitor number tracker. It is the only
|
I don't have any kind of request or traffic monitoring on my server. So no, your
|
||||||
usage/visitor metric tracking I have, which is implemented by website's API, which is free (as in freedom) so you can
|
HTTP(S) requests or other network connections are not processed to generate
|
||||||
go audit it's code yourself.
|
colorful graphs, pie charts and stuff.
|
||||||
|
|
||||||
I want to make it clear that this metric tracker does not store any information about you or your HTTP(S) requests to
|
You may have realized that in the bottom of this page there is total visitor
|
||||||
a database. It temporarily stores your IP address' SHA1 hash, in memory, so it doesn't recount the same visitor again
|
number tracker. It is the only usage/visitor metric tracking I have, which is
|
||||||
when they refresh the website or visit it multiple times in a short period of time. After a certain amount of requests,
|
implemented by website's API, which is free (as in freedom) so you can go audit
|
||||||
your IP address' SHA1 hash will be removed from the memory and it will be replaced with a new visitor's SHA1 hash instead.
|
it's code yourself.
|
||||||
|
|
||||||
|
I want to make it clear that this metric tracker does not store any information
|
||||||
|
about you or your HTTP(S) requests to a database. It temporarily stores your IP
|
||||||
|
address' SHA1 hash, in memory, so it doesn't recount the same visitor again when
|
||||||
|
they refresh the website or visit it multiple times in a short period of time.
|
||||||
|
After a certain amount of requests, your IP address' SHA1 hash will be removed
|
||||||
|
from the memory and it will be replaced with a new visitor's SHA1 hash instead.
|
||||||
|
|
||||||
## Logs
|
## Logs
|
||||||
All the HTTP(S) services are proxied with nginx, and nginx logs all of them to a file on the disk. This file (`access.log`)
|
|
||||||
is only readable by the root user, and it is contents are deleted every 4 hours (with `shred` to make sure it doesn't leave
|
All the HTTP(S) services are proxied with nginx, and nginx logs all of them to a
|
||||||
anything on the disk). The logs include *only* the following information:
|
file on the disk. This file (`access.log`) is only readable by the root user,
|
||||||
|
and it is contents are deleted every 4 hours (with `shred` to make sure it
|
||||||
|
doesn't leave anything on the disk). The logs include _only_ the following
|
||||||
|
information:
|
||||||
|
|
||||||
- Request time
|
- Request time
|
||||||
- Requested host
|
- Requested host
|
||||||
@@ -33,9 +46,12 @@ anything on the disk). The logs include *only* the following information:
|
|||||||
- HTTP request method
|
- HTTP request method
|
||||||
- HTTP response code
|
- HTTP response code
|
||||||
|
|
||||||
This is the minimal information I need to trace any issues if something goes wrong, which is the main reason why I use
|
This is the minimal information I need to trace any issues if something goes
|
||||||
logging at all, to make it easier to find any issues.
|
wrong, which is the main reason why I use logging at all, to make it easier to
|
||||||
|
find any issues.
|
||||||
|
|
||||||
## Data removal
|
## Data removal
|
||||||
If you want to remove any of your data from my server, [you can send me an email](mailto:ngn@ngn.tf). And yes this includes
|
|
||||||
removing usage metrics and logs.
|
If you want to remove any of your data from my server,
|
||||||
|
[you can contact me](/#contact). And yes this includes removing usage metrics
|
||||||
|
and logs.
|
||||||
|
@@ -1,30 +1,46 @@
|
|||||||
Kişisel olarak ben de bir gizlik savunucusu olduğumdan, bir yandan sunucumu güvende tutarken bir yandan da gizliliğinize önem
|
Kişisel olarak ben de bir gizlik savunucusu olduğumdan, bir yandan sunucumu
|
||||||
göstermek için elimden geleni yapıyorum. Aynı zamanda bu tarz şeyler hakkında şeffaf ve açık olmanın önemli olduğunu düşünüyorum,
|
güvende tutarken bir yandan da gizliliğinize önem göstermek için elimden geleni
|
||||||
o yüzden verilerinizi nasıl işlediğimi ya da depoladığımı anlamanız için bu dökümanı yazmaya karar verdim.
|
yapıyorum. Aynı zamanda bu tarz şeyler hakkında şeffaf ve açık olmanın önemli
|
||||||
|
olduğunu düşünüyorum, o yüzden verilerinizi nasıl işlediğimi ya da depoladığımı
|
||||||
|
anlamanız için bu dökümanı yazmaya karar verdim.
|
||||||
|
|
||||||
## DNS & SSL
|
## DNS & SSL
|
||||||
Şuan cloudflare'in isim sunucularını kullanıyorum, ancak cloudflare alan adıma sahip değil (alan adımı cloudflare'den almadım)
|
|
||||||
ve aynı şekilde herhangi bir trafiğe vekillik etmiyor. Tüm DNS kayıtlarım *Sadece DNS* modunu kullanıyor, yani sadece
|
Şuan cloudflare'in isim sunucularını kullanıyorum, ancak cloudflare alan adıma
|
||||||
DNS kayıtlarından ibaretler ve benim sunucuma işaret ediyorlar, cloudflare'e değil. Bu aynı zamanda cloudflare SSL sertifikalarımı
|
sahip değil (alan adımı cloudflare'den almadım) ve aynı şekilde herhangi bir
|
||||||
kontrol etmiyor demek. Tüm sertifikalar benim sunucumda tutuluyor ve Let's Encrypt ile oluşturuldular. Yani sertifikalar bana ait
|
trafiğe vekillik etmiyor. Tüm DNS kayıtlarım _Sadece DNS_ modunu kullanıyor,
|
||||||
ve cloudflare'in aniden DNS kayıtlarını değiştirmesi mümkün değil (bu SSL'in bozulmasına sebep olur).
|
yani sadece DNS kayıtlarından ibaretler ve benim sunucuma işaret ediyorlar,
|
||||||
|
cloudflare'e değil. Bu aynı zamanda cloudflare SSL sertifikalarımı kontrol
|
||||||
|
etmiyor demek. Tüm sertifikalar benim sunucumda tutuluyor ve Let's Encrypt ile
|
||||||
|
oluşturuldular. Yani sertifikalar bana ait ve cloudflare'in aniden DNS
|
||||||
|
kayıtlarını değiştirmesi mümkün değil (bu SSL'in bozulmasına sebep olur).
|
||||||
|
|
||||||
## Kullanım metrikleri
|
## Kullanım metrikleri
|
||||||
Sunucumda herhangi bir istek ya da trafik monitörlermesi yok. Yani hayır, HTTP(S) istekleriniz ya da diğer ağ
|
|
||||||
bağlantılarınız renki grafikler, pasta grafikleri gibi şeyler üretmek için işlenmiyor.
|
|
||||||
|
|
||||||
Bu sayfanın altında bir ziyaretçi sayısı takipçisi olduğunu farketmiş olabilirsiniz. Bu kullandığım tek kullanım/ziyaretçi
|
Sunucumda herhangi bir istek ya da trafik monitörlermesi yok. Yani hayır,
|
||||||
metrik takibi ve websitemin, özgür olan, bu yüzden kodunu kendiniz denetleyebileceğiniz API'ı ile implemente edildi.
|
HTTP(S) istekleriniz ya da diğer ağ bağlantılarınız renki grafikler, pasta
|
||||||
|
grafikleri gibi şeyler üretmek için işlenmiyor.
|
||||||
|
|
||||||
Bu metrik takipçisinin, HTTP(S) istekleriniz hakkında herhangi bir veriyi bir veri tabanına kaydetmediğini belirtmek isterim.
|
Bu sayfanın altında bir ziyaretçi sayısı takipçisi olduğunu farketmiş
|
||||||
Bu takipçi geçici olarak IP adresinizin SHA1 hash'ini bellekte tutuyor, bunun amacı aynı ziyaretçiyi sayfayı yenilediği zaman
|
olabilirsiniz. Bu kullandığım tek kullanım/ziyaretçi metrik takibi ve
|
||||||
ya da kısa bir süre için websitesini birden fazla kez ziyaret ettiği zaman tekrar saymayı önlemek. Belirli bir miktar istekten
|
websitemin, özgür olan, bu yüzden kodunu kendiniz denetleyebileceğiniz API'ı ile
|
||||||
sonra, IP adresinizin SHA1 hash'i bellekten kaldırılacaktır ve yeni bir ziyaretçinin SHA1'i onun yerine geçicektir.
|
implemente edildi.
|
||||||
|
|
||||||
|
Bu metrik takipçisinin, HTTP(S) istekleriniz hakkında herhangi bir veriyi bir
|
||||||
|
veri tabanına kaydetmediğini belirtmek isterim. Bu takipçi geçici olarak IP
|
||||||
|
adresinizin SHA1 hash'ini bellekte tutuyor, bunun amacı aynı ziyaretçiyi sayfayı
|
||||||
|
yenilediği zaman ya da kısa bir süre için websitesini birden fazla kez ziyaret
|
||||||
|
ettiği zaman tekrar saymayı önlemek. Belirli bir miktar istekten sonra, IP
|
||||||
|
adresinizin SHA1 hash'i bellekten kaldırılacaktır ve yeni bir ziyaretçinin
|
||||||
|
SHA1'i onun yerine geçicektir.
|
||||||
|
|
||||||
## Kayıtlar
|
## Kayıtlar
|
||||||
Tüm HTTP(S) servisleri nginx ile vekilleniyor, ve nginx hepsini disk üzerindeki bir dosyaya kaydediyor. Bu dosya (`access.log`)
|
|
||||||
sadece root kullanıcısı tarafından okunabilir, ve içerği her 4 saatde bir siliniyor (diskde veri kalmadığından emin olmak için
|
Tüm HTTP(S) servisleri nginx ile vekilleniyor, ve nginx hepsini disk üzerindeki
|
||||||
shred komutu ile). Kayıtlar *sadece* aşağıdaki bilgileri içeriyor:
|
bir dosyaya kaydediyor. Bu dosya (`access.log`) sadece root kullanıcısı
|
||||||
|
tarafından okunabilir, ve içerği her 4 saatde bir siliniyor (diskde veri
|
||||||
|
kalmadığından emin olmak için shred komutu ile). Kayıtlar _sadece_ aşağıdaki
|
||||||
|
bilgileri içeriyor:
|
||||||
|
|
||||||
- İstek zamanı
|
- İstek zamanı
|
||||||
- İstenilen host
|
- İstenilen host
|
||||||
@@ -32,9 +48,12 @@ shred komutu ile). Kayıtlar *sadece* aşağıdaki bilgileri içeriyor:
|
|||||||
- HTTP istek yöntemi
|
- HTTP istek yöntemi
|
||||||
- HTTP cevap kodu
|
- HTTP cevap kodu
|
||||||
|
|
||||||
Bu birşeyler yanlış giderse sorunları bulmak için ihtiyacım olan en az bilgi, kayıt tutmamın ana sebeplerinden bir tanesi
|
Bu birşeyler yanlış giderse sorunları bulmak için ihtiyacım olan en az bilgi,
|
||||||
zaten bu, sorunları bulmayı kolaylaştırmak.
|
kayıt tutmamın ana sebeplerinden bir tanesi zaten bu, sorunları bulmayı
|
||||||
|
kolaylaştırmak.
|
||||||
|
|
||||||
## Veri silimi
|
## Veri silimi
|
||||||
Sunucumdan herhangi bir verinizi kaldırmak isterseniz, [bana bir email gönderebilirsiniz](mailto:ngn@ngn.tf). Ve evet buna
|
|
||||||
kullanım metrikleri ve kayıtlar dahil.
|
Sunucumdan herhangi bir verinizi kaldırmak isterseniz,
|
||||||
|
[bana bir ulaşabilirsiniz](/#contact). Ve evet buna kullanım metrikleri ve
|
||||||
|
kayıtlar dahil.
|
||||||
|
Reference in New Issue
Block a user