Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
obfs4-deprecated
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
obfs4-deprecated
Commits
b9e3aedf
Commit
b9e3aedf
authored
11 years ago
by
Yawning Angel
Browse files
Options
Downloads
Patches
Plain Diff
Make the output from "-gen" be more useful.
parent
50cc1800
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
obfs4proxy/obfs4proxy.go
+10
-2
10 additions, 2 deletions
obfs4proxy/obfs4proxy.go
with
10 additions
and
2 deletions
obfs4proxy/obfs4proxy.go
+
10
−
2
View file @
b9e3aedf
...
@@ -337,7 +337,7 @@ func generateServerParams(id string) {
...
@@ -337,7 +337,7 @@ func generateServerParams(id string) {
return
return
}
}
fmt
.
Println
(
"Generated node
_
id:"
,
parsedID
.
Base64
())
fmt
.
Println
(
"Generated node
-
id:"
,
parsedID
.
Base64
())
keypair
,
err
:=
ntor
.
NewKeypair
(
false
)
keypair
,
err
:=
ntor
.
NewKeypair
(
false
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -347,11 +347,19 @@ func generateServerParams(id string) {
...
@@ -347,11 +347,19 @@ func generateServerParams(id string) {
fmt
.
Println
(
"Generated private-key:"
,
keypair
.
Private
()
.
Base64
())
fmt
.
Println
(
"Generated private-key:"
,
keypair
.
Private
()
.
Base64
())
fmt
.
Println
(
"Generated public-key:"
,
keypair
.
Public
()
.
Base64
())
fmt
.
Println
(
"Generated public-key:"
,
keypair
.
Public
()
.
Base64
())
fmt
.
Println
()
fmt
.
Println
(
"Client config: "
)
fmt
.
Printf
(
" Bridge obfs4 <IP Address:Port> %s node-id=%s public-key=%s
\n
"
,
id
,
parsedID
.
Base64
(),
keypair
.
Public
()
.
Base64
())
fmt
.
Println
()
fmt
.
Println
(
"Server config:"
)
fmt
.
Printf
(
" ServerTransportOptions obfs4 node-id=%s private-key=%s
\n
"
,
parsedID
.
Base64
(),
keypair
.
Private
()
.
Base64
())
}
}
func
main
()
{
func
main
()
{
// Some command line args.
// Some command line args.
genParams
:=
flag
.
String
(
"gen"
,
""
,
"Generate params given a
Node ID
."
)
genParams
:=
flag
.
String
(
"gen"
,
""
,
"Generate
server
params given a
bridge fingerprint
."
)
flag
.
Parse
()
flag
.
Parse
()
if
*
genParams
!=
""
{
if
*
genParams
!=
""
{
generateServerParams
(
*
genParams
)
generateServerParams
(
*
genParams
)
...
...
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