Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
40e3c3a7
Commit
40e3c3a7
authored
7 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[fix] regex HOST_ONION_REGEX (and increase REQUEST_TOR_TIMEOUT)
parent
94a394ee
No related branches found
No related tags found
1 merge request
!1178
Add WS2PTOR features
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/lib/common-libs/constants.ts
+1
-1
1 addition, 1 deletion
app/lib/common-libs/constants.ts
app/modules/ws2p/lib/constants.ts
+1
-1
1 addition, 1 deletion
app/modules/ws2p/lib/constants.ts
with
2 additions
and
2 deletions
app/lib/common-libs/constants.ts
+
1
−
1
View file @
40e3c3a7
...
@@ -37,7 +37,7 @@ const WS2PTOR_REGEXP = /^WS2PTOR ([a-f0-9]{8}) ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.
...
@@ -37,7 +37,7 @@ const WS2PTOR_REGEXP = /^WS2PTOR ([a-f0-9]{8}) ([a-z0-9-_.]*|[0-9.]+|[0-9a-f:]+.
const
WS_FULL_ADDRESS_ONION_REGEX
=
/'^
(?:
wss
?
:
\/\/)(?:
www
\.)?([
0-9a-z
]{16}\.
onion
)(
:
[
0-9
]
+
)?(\/[
-
\w]
*
)
*/
const
WS_FULL_ADDRESS_ONION_REGEX
=
/'^
(?:
wss
?
:
\/\/)(?:
www
\.)?([
0-9a-z
]{16}\.
onion
)(
:
[
0-9
]
+
)?(\/[
-
\w]
*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]
d
)
|
(
d
{1,2}))
b
)
.
){3}(
b
((
25
[
0-5
])
|
(
1d
{2})
|
(
2
[
0-4
]
d
)
|
(
d
{1,2}))
b
))
|
(
::
([
0-9A-Fa-f
]{1,4}
:
){0,5}((
b
((
25
[
0-5
])
|
(
1d
{2})
|
(
2
[
0-4
]
d
)
|
(
d
{1,2}))
b
)
.
){3}(
b
((
25
[
0-5
])
|
(
1d
{2})
|
(
2
[
0-4
]
d
)
|
(
d
{1,2}))
b
))
|
([
0-9A-Fa-f
]{1,4}
::
([
0-9A-Fa-f
]{1,4}
:
){0,5}[
0-9A-Fa-f
]{1,4})
|
(
::
([
0-9A-Fa-f
]{1,4}
:
){0,6}[
0-9A-Fa-f
]{1,4})
|
(([
0-9A-Fa-f
]{1,4}
:
){1,7}
:
))
$/
;
const
HOST_ONION_REGEX
=
/
'
^
(?:
www
\.)?([
0-9a-z
]{16}\.
onion
)
$
'
/
const
HOST_ONION_REGEX
=
/^
(?:
www
\.)?([
0-9a-z
]{16}\.
onion
)
$/
const
MAXIMUM_LEN_OF_COMPACT_TX
=
100
const
MAXIMUM_LEN_OF_COMPACT_TX
=
100
const
MAXIMUM_LEN_OF_OUTPUT
=
2000
const
MAXIMUM_LEN_OF_OUTPUT
=
2000
...
...
This diff is collapsed.
Click to expand it.
app/modules/ws2p/lib/constants.ts
+
1
−
1
View file @
40e3c3a7
...
@@ -9,7 +9,7 @@ export const WS2PConstants = {
...
@@ -9,7 +9,7 @@ export const WS2PConstants = {
CONNEXION_TIMEOUT
:
15000
,
CONNEXION_TIMEOUT
:
15000
,
REQUEST_TIMEOUT
:
15000
,
REQUEST_TIMEOUT
:
15000
,
CONNEXION_TOR_TIMEOUT
:
30000
,
CONNEXION_TOR_TIMEOUT
:
30000
,
REQUEST_TOR_TIMEOUT
:
3
0000
,
REQUEST_TOR_TIMEOUT
:
6
0000
,
RECONNEXION_INTERVAL_IN_SEC
:
60
*
10
,
// 10 minutes
RECONNEXION_INTERVAL_IN_SEC
:
60
*
10
,
// 10 minutes
BLOCK_PULLING_INTERVAL
:
300
*
2
,
// 10 minutes
BLOCK_PULLING_INTERVAL
:
300
*
2
,
// 10 minutes
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment