-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
from __main__ import main | ||
"""A Secure Socket Tunneling Protocol (SSTP) server. | ||
https://github.com/sorz/sstp-server | ||
""" | ||
__version__ = '0.3.7' | ||
|
||
|
||
def run(): | ||
from __main__ import main | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/usr/bin/env python2 | ||
from __future__ import absolute_import, print_function | ||
import sys | ||
import logging | ||
import argparse | ||
from ConfigParser import SafeConfigParser, NoSectionError | ||
from twisted.internet.endpoints import SSL4ServerEndpoint | ||
from twisted.internet import reactor, ssl | ||
|
||
from sstp import SSTPProtocolFactory | ||
from address import IPPool | ||
from . import __doc__ | ||
from .sstp import SSTPProtocolFactory | ||
from .address import IPPool | ||
|
||
|
||
def _getArgs(): | ||
conf_parser = argparse.ArgumentParser( | ||
description='A Secure Socket Tunneling Protocol (SSTP) server.', | ||
epilog='Author: Sorz <[email protected]>.', | ||
add_help=False) | ||
conf_parser.add_argument("-f", "--conf-file", | ||
help="Specify config file.", metavar="FILE") | ||
|
@@ -30,11 +30,12 @@ def _getArgs(): | |
defaults = dict(config.items(args.conf_section)) | ||
except NoSectionError as e: | ||
print('Error: section [%s] not found in config file.' % \ | ||
args.conf_section) | ||
args.conf_section, file=sys.stderr) | ||
sys.exit(1) | ||
return | ||
|
||
parser = argparse.ArgumentParser(parents=[conf_parser]) | ||
parser = argparse.ArgumentParser(parents=[conf_parser], | ||
description=__doc__) | ||
parser.set_defaults(**defaults) | ||
parser.add_argument('-l', '--listen', | ||
default='', | ||
|